Page MenuHomeFreeBSD

Unbreak on 11.x and 12.x
ClosedPublic

Authored by farrokhi on Jun 6 2017, 9:36 AM.
Tags
None
Referenced Files
F81557016: D11072.id.diff
Thu, Apr 18, 12:55 AM
F81547129: D11072.diff
Wed, Apr 17, 8:40 PM
Unknown Object (File)
Wed, Apr 17, 3:58 AM
Unknown Object (File)
Feb 29 2024, 12:02 AM
Unknown Object (File)
Jan 26 2024, 10:56 PM
Unknown Object (File)
Jan 26 2024, 10:56 PM
Unknown Object (File)
Jan 26 2024, 10:56 PM
Unknown Object (File)
Jan 26 2024, 10:56 PM
Subscribers

Details

Summary

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

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #30392)

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.