FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.29k stars 1.25k forks source link

zebra: ignore IFF_PROMISC message #16959

Closed lsang6WIND closed 4 days ago

lsang6WIND commented 5 days ago

Ignore netlink NEW_LINK message when the change is only IFF_PROMISC. This will avoid route updates when the interface enter/left promiscuous mode.

donaldsharp commented 5 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?

lsang6WIND commented 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?

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

mjstapp commented 4 days ago

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 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

lsang6WIND commented 4 days ago

OK, close it.