Closed lsang6WIND closed 4 days ago
I thought we went through this before. What guarantee do we have that only a promiscuous mode change is only that and nothing else on the interface?
I thought we went through this before. What guarantee do we have that only a promiscuous mode change is only that and nothing else on the interface?
Despite the Linux documentation on struct ifinfomsg
:
if_flags
contains the state of interface flags.
if_change
indicate the state change (flag change(s)).
so if if_change
have only the IFF_PROMISC
bit set, we should have only interface enter/left promiscuous mode change.
However, this part is not mentionned by https://man7.org/linux/man-pages/man7/rtnetlink.7.html
so in addition to the other comment I made, frankly: has someone done a survey of kernels, and identified the kernel versions where this statement is correct? is it always correct, for every kernel everywhere in use? if not, how will you adapt to the differences?
Despite the Linux documentation on
struct ifinfomsg
:if_flags
contains the state of interface flags.if_change
indicate the state change (flag change(s)).so if
if_change
have only theIFF_PROMISC
bit set, we should have only interface enter/left promiscuous mode change.However, this part is not mentionned by https://man7.org/linux/man-pages/man7/rtnetlink.7.html
OK, close it.
Ignore netlink NEW_LINK message when the change is only IFF_PROMISC. This will avoid route updates when the interface enter/left promiscuous mode.