Page MenuHomeFreeBSD

Unbreak on 11.x and 12.x
ClosedPublic

Authored by farrokhi on Jun 6 2017, 9:36 AM.

Details

Summary

Fix build on 11.0 and later due to missing libpcap header file

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9695
Build 10135: arc lint + arc unit

Event Timeline

I find it weird to include header files like that, newer version of libcap does not provide pcap-int.h, it is probably because it has been replaced by something, there might be a better approach to address this, I'll think about it and come back to you

Removed reference to unnecessary header files to unbreak on 11.x and 12.x

Turns out there was a much simpler solution for this build failure. By simply removing reference to "pcap-int.h" (which was not used at all) now this port builds on 10.x, 11.x and 12x just fine.

Unbreak on 11.x+ by removing reference to unused header file.

Also fixed an issue with creating RAW sockets which caused failure when tracing TCP/UDP (reported by Andrew Wu <yauhwawu@gmail.com>)

net/lft/files/patch-lft__types.h
6

Maybe just add a && !defined(FreeBSD) which will be less intrusive

farrokhi marked an inline comment as done.

Use a less intrusive method to find out if we should include "pcap-int.h"

net/lft/files/patch-lft__icmptrace.c
8 ↗(On Diff #30394)

Instead of changing this one, it seems to me more apropriate to modify lft_lib.h line 280 to also add a && !defined(FreeBSD)

net/lft/files/patch-lft__lib.c
8 ↗(On Diff #30394)

The change in lft_lib.h should also make that patch obsolete (needs testing)

farrokhi marked 2 inline comments as done.

Improve the logic when detecting when whether or not we should reverse byte order for ip_len and ip_off.

net/lft/files/patch-lft__icmptrace.c
8 ↗(On Diff #30394)

True. I just adjusted the logic to disable SCREWED_IP_LEN flag if it is being built on FreeBSD so that byte order reversal will be done appropriately.

This revision is now accepted and ready to land.Jul 4 2017, 9:34 AM
This revision was automatically updated to reflect the committed changes.

Be sure to send these upstream as well

Be sure to send these upstream as well

Sure. I just did. Thanks for noting.