summaryrefslogtreecommitdiffstats
path: root/sys/dev/re
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-12-18 18:24:27 +0000
committerglebius <glebius@FreeBSD.org>2005-12-18 18:24:27 +0000
commit175e16aa4df4f5510a7a395b24bd5ac9a00145f9 (patch)
treeedde4e6e448953c23a09236086ca19000c7a4fb5 /sys/dev/re
parent035fda79903772207b9132abc6ed91ac80535900 (diff)
downloadFreeBSD-src-175e16aa4df4f5510a7a395b24bd5ac9a00145f9.zip
FreeBSD-src-175e16aa4df4f5510a7a395b24bd5ac9a00145f9.tar.gz
- 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
Diffstat (limited to 'sys/dev/re')
-rw-r--r--sys/dev/re/if_re.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index 28f9c2a..6143ba2 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -1671,9 +1671,12 @@ re_rxeof(sc)
}
}
- if (rxvlan & RL_RDESC_VLANCTL_TAG)
+ if (rxvlan & RL_RDESC_VLANCTL_TAG) {
VLAN_INPUT_TAG(ifp, m,
- ntohs((rxvlan & RL_RDESC_VLANCTL_DATA)), continue);
+ ntohs((rxvlan & RL_RDESC_VLANCTL_DATA)));
+ if (m == NULL)
+ continue;
+ }
RL_UNLOCK(sc);
(*ifp->if_input)(ifp, m);
RL_LOCK(sc);
OpenPOWER on IntegriCloud