diff options
author | Marius Strobl <marius@FreeBSD.org> | 2023-07-23 16:58:42 +0000 |
---|---|---|
committer | Marius Strobl <marius@FreeBSD.org> | 2023-08-06 17:17:30 +0000 |
commit | b59b3443f39d2b7d6c631094fde7723e0aec1319 (patch) | |
tree | e535415ccf3a5892302e46faaba2b5015d1400b3 /sys/net/if_gif.c | |
parent | 3b0d328a2defb7a949f6ca5afd83281ceed1b6c8 (diff) |
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)
Diffstat (limited to 'sys/net/if_gif.c')
-rw-r--r-- | sys/net/if_gif.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 |