git: b59b3443f39d - stable/13 - gif(4): Assert that gif_output() isn't called for EtherIP
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 06 Aug 2023 20:36:25 UTC
The branch stable/13 has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=b59b3443f39d2b7d6c631094fde7723e0aec1319 commit b59b3443f39d2b7d6c631094fde7723e0aec1319 Author: Marius Strobl <marius@FreeBSD.org> AuthorDate: 2023-07-23 16:58:42 +0000 Commit: Marius Strobl <marius@FreeBSD.org> CommitDate: 2023-08-06 17:17:30 +0000 gif(4): Assert that gif_output() isn't called for EtherIP With the current implementation of if_bridge(4), bridge_enqueue() calls gif_transmit() only. Ensure it stays that way so that the expectations in both drivers are either met or changed accordingly. PR: 227450 (cherry picked from commit 8a0308722372a3ac6a94967ae4fe3123842309e2) --- sys/net/if_gif.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 4d2c1dcf091d..343c1cd070ad 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -406,6 +406,9 @@ gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, { uint32_t af; + KASSERT(ifp->if_bridge == NULL, + ("%s: unexpectedly called with bridge attached", __func__)); + if (dst->sa_family == AF_UNSPEC) memcpy(&af, dst->sa_data, sizeof(af)); else