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
This commit is contained in:
Marius Strobl 2023-07-23 18:58:42 +02:00
parent e82d7b2952
commit 8a03087223

View File

@ -407,6 +407,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