Created attachment 224454 [details] ng_bridge.c patch When for some reason (including legitimate) sending manycast (in my case DHCP reply broadcast) packet to one of multiple links of ng_bridge fails (for example eiface is administratively brought down) the original packet isn't send via first found link. This makes no sense for me as other links are tolerated for errors. Attached patch changes this behavior as send the packet to all links and keeps the logic to return the last seen error.
Thank you for pointing out this issue. I chosed a different and more general solution. May you please check this patch? https://reviews.freebsd.org/D30008
I don't see any change in patch semantics, it's just rephrasing so it should works. Will provide feedback when have time to test your patch.
Made some basic testing with the new patch, no issues were observed so far.
I'll wait for reviews from others before commiting it.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=a56e5ad6903037861457da754574b4903dcb0e7e commit a56e5ad6903037861457da754574b4903dcb0e7e Author: Lutz Donnerhacke <donner@FreeBSD.org> AuthorDate: 2021-04-27 07:49:50 +0000 Commit: Lutz Donnerhacke <donner@FreeBSD.org> CommitDate: 2021-05-13 19:49:20 +0000 netgraph/ng_bridge: Handle send errors during loop handling If sending out a packet fails during the loop over all links, the allocated memory is leaked and not all links receive a copy. This patch fixes those problems, clarifies a premature abort of the loop, and fixes a minory style(9) bug. PR: 255430 Submitted by: Dancho Penev Tested by: Dancho Penev MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30008 sys/netgraph/ng_bridge.c | 55 ++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 25 deletions(-)
^Triage: Re-open pending MFC
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e240dd0d502e5c6741007e6e8f9ac41a0e5c33cd commit e240dd0d502e5c6741007e6e8f9ac41a0e5c33cd Author: Lutz Donnerhacke <donner@FreeBSD.org> AuthorDate: 2021-04-27 07:49:50 +0000 Commit: Lutz Donnerhacke <donner@FreeBSD.org> CommitDate: 2021-05-20 05:52:21 +0000 netgraph/ng_bridge: Handle send errors during loop handling If sending out a packet fails during the loop over all links, the allocated memory is leaked and not all links receive a copy. This patch fixes those problems, clarifies a premature abort of the loop, and fixes a minory style(9) bug. PR: 255430 Submitted by: Dancho Penev Tested by: Dancho Penev Differential Revision: https://reviews.freebsd.org/D30008 (cherry picked from commit a56e5ad6903037861457da754574b4903dcb0e7e) sys/netgraph/ng_bridge.c | 55 ++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 25 deletions(-)
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=1165cafa0baee55a46459e4cf7c2573ca25a0a1c commit 1165cafa0baee55a46459e4cf7c2573ca25a0a1c Author: Lutz Donnerhacke <donner@FreeBSD.org> AuthorDate: 2021-04-27 07:49:50 +0000 Commit: Lutz Donnerhacke <donner@FreeBSD.org> CommitDate: 2021-05-20 05:58:30 +0000 netgraph/ng_bridge: Handle send errors during loop handling If sending out a packet fails during the loop over all links, the allocated memory is leaked and not all links receive a copy. This patch fixes those problems, clarifies a premature abort of the loop, and fixes a minory style(9) bug. PR: 255430 Submitted by: Dancho Penev Tested by: Dancho Penev Differential Revision: https://reviews.freebsd.org/D30008 (cherry picked from commit a56e5ad6903037861457da754574b4903dcb0e7e) sys/netgraph/ng_bridge.c | 57 ++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 26 deletions(-)