-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRAFT: Support both "igrp" and "eigrp" in filters. #1428
base: master
Are you sure you want to change the base?
Conversation
c8d2dd0
to
0a02647
Compare
This is one way to deal with the "igrp"/"eigrp" issues that b33f396 works around. It makes libpcap's filter compiler, when compiled in FreeBSD, DragonFly BSD, or macOS work differently for a filter |
This is one of five (so far!) inconsistencies that would require changing the meaning of some keywords or removing/adding keywords to be solved properly. Before making any changes I had in mind to:
For this particular problem a potential solution could be replacing "eigrp" with the standard protocol names ("igp" for 9 and "eigrp" for 88). |
Is there a standard protocol named "IGP" (Interior Gateway Protocol), or is that a name for a type of protocol, as per https://en.wikipedia.org/wiki/Interior_gateway_protocol? |
What are the other four? |
"igp" appears in Linux and FreeBSD |
Use our own header to define IPPROTO_ values, rather than leaving them up to the OS for which we're building. Always use IP protocol 9 for "igrp", and use IP protocol 88 for "eigrp". 9 is assigned to "any private Internet gateway protocol", and is mainly used for Cisco's IGRP. 88 is for Cisco's EIGRP, which is not compatible on-the-wire with IGRP. FreeBSD, DragonFly BSD and macOS define IPPROTO_IGRP as 88, rather than as 9, and their libpcaps use IP protocol 88 for "igrp". Everybody else uses IP protocol 9 for "igrp".
0a02647
to
9b15cc6
Compare
So it's "pigp" without the "p". |
Let me suggest documenting this better (the change log, the backward compatibility section of the man page) and waiting a bit until it is clear which other related changes go along. |
Use our own header to define IPPROTO_ values, rather than leaving them up to the OS for which we're building.
Always use IP protocol 9 for "igrp", and use IP protocol 88 for "eigrp". 9 is assigned to "any private Internet gateway protocol", and is mainly used for Cisco's IGRP. 88 is for Cisco's EIGRP, which is not compatible on-the-wire with IGRP.
FreeBSD, DragonFly BSD and macOS define IPPROTO_IGRP as 88, rather than as 9, and their libpcaps use IP protocol 88 for "igrp". Everybody else uses IP protocol 9 for "igrp".