-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
zebra: prevent multiple up notifications to zclients #14366
zebra: prevent multiple up notifications to zclients #14366
Conversation
When using tcpdump over an interface, the interface raises, then unraises the promiscuous mode to that interface. The zebra daemon systematically considers this change as an up event, and all the zebra clients are triggered. Fix this by avoiding sending multiple up notifications if at last notification, the status of the interface was already up. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't there many interface changes that are distributed in this path - are you certain that adding this restriction will continue to distribute all of the interface attribute changes promptly?
Continuous Integration Result: FAILEDTest incomplete. See below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: IncompleteTopotests Ubuntu 18.04 arm8 part 7: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 7: No useful log foundTopotests Ubuntu 18.04 arm8 part 8: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 8: No useful log foundTopotests debian 10 amd64 part 9: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO9DEB10AMD64-14042/test Topology Tests failed for Topotests debian 10 amd64 part 9 Topotests Ubuntu 18.04 arm8 part 9: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-14042/artifact/TOPO9U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 9: No useful log foundTopotests Ubuntu 18.04 amd64 part 9: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO9U18AMD64-14042/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 9 Topotests debian 10 amd64 part 6: Incomplete(check logs for details)Addresssanitizer topotests part 4: Incomplete(check logs for details)Addresssanitizer topotests part 1: Failed (click for details)
Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-ASAN1-14042/test Topology Tests failed for Addresssanitizer topotests part 1 Topotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO9U18I386-14042/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 9 Successful on other platforms/tests
|
I made a test that shows that on static daemon for instance, you are not disturbed again and again, because of an operator that often does tcpdump. This said, I am still not sure this is the good place to do the fix, this is why I created the pull request to see. |
So do you know exactly what about 'tcpdump' is triggering these notifications to zebra (and then out to the daemons)? Is it an interface flag, like a "promiscuous" flag or something similar? Why is this a problem - is staticd actually reacting to that change in some way? I mean, a zapi message is a ... microsecond sort of event, unless the message actually triggers some response somewhere in the system. If you could identify a specific pattern, a specific attribute change, you could make a configurable filter that would allow someone to drop those notifications, but it'd take some work to distinguish that specific change, since there are so many interface attributes. If you could identify that staticd was reacting to a benign event (like a flag change) in an incorrect way, then that could be fixed.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAK — pimd
actually returns the PROMISC
flag from some show commands (including JSON output), so the up notification is needed to have pimd update its stored flags. (And returning the PROMISC flag can be relevant for debugging multicast issues with L2 filtering.)
Possibly, the promiscuous flag is the faulty one, and before David told about that, I was thinking none in FRR cares about those flags. The dire consequence of an up event sent multiple times is that the calling daemon may do multiple times the same action, if it is not protected against multiple consecutive up events. For instance, suppose you receive an up event that triggers staticd to call ZAPI_ROUTE_ADD for a series of 10 static routes. Possibly, a second if up event will call again ZAPI_ROUTE_ADD 10 more times.
|
Ah - and this is exactly what I was trying to get at. If staticd does something bad, then staticd has a bug, and that is where the fix should be applied. The zapi message that zebra sends conveys many kinds of information, not just a binary up/down state change. The daemons should be able to see updates to an interface's properties without assuming that the interface has somehow silently gone down and returned.
|
When using tcpdump over an interface, the interface raises, then unraises the promiscuous mode to that interface. The zebra daemon systematically considers this change as an up event, and all the zebra clients are triggered.
Fix this by avoiding sending multiple up notifications if at last notification, the status of the interface was already up.