From 175e16aa4df4f5510a7a395b24bd5ac9a00145f9 Mon Sep 17 00:00:00 2001 From: glebius Date: Sun, 18 Dec 2005 18:24:27 +0000 Subject: - Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag in case if memory allocation failed. - Remove fourth argument from VLAN_INPUT_TAG(), that was used incorrectly in almost all drivers. Indicate failure with mbuf value of NULL. In collaboration with: yongari, ru, sam --- sys/dev/txp/if_txp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/dev/txp') diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c index 6f3429e..ae22015 100644 --- a/sys/dev/txp/if_txp.c +++ b/sys/dev/txp/if_txp.c @@ -766,8 +766,9 @@ txp_rx_reclaim(sc, r) } if (rxd->rx_stat & RX_STAT_VLAN) { - VLAN_INPUT_TAG(ifp, - m, htons(rxd->rx_vlan >> 16), goto next); + VLAN_INPUT_TAG(ifp, m, htons(rxd->rx_vlan >> 16)); + if (m == NULL) + goto next; } TXP_UNLOCK(sc); -- cgit v1.1