summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2001-12-03 17:28:27 +0000
committerbrooks <brooks@FreeBSD.org>2001-12-03 17:28:27 +0000
commit8b6f6e9487a28169a664f628114a3cf9a1de1819 (patch)
tree3ec2b2e029e880f02c5d9088938736698a408ac5 /sys/net
parentb5de44291122e0fc2bf68540749f66b3992d3ea2 (diff)
downloadFreeBSD-src-8b6f6e9487a28169a664f628114a3cf9a1de1819.zip
FreeBSD-src-8b6f6e9487a28169a664f628114a3cf9a1de1819.tar.gz
Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the
mbuf instead. Suggested by: fenner
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/ethernet.h20
-rw-r--r--sys/net/if_ethersubr.c2
2 files changed, 11 insertions, 11 deletions
diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h
index b5a0fae..7380e31 100644
--- a/sys/net/ethernet.h
+++ b/sys/net/ethernet.h
@@ -102,35 +102,35 @@ extern void (*ng_ether_detach_p)(struct ifnet *ifp);
extern int (*vlan_input_p)(struct ether_header *eh, struct mbuf *m);
extern int (*vlan_input_tag_p)(struct ether_header *eh, struct mbuf *m,
u_int16_t t);
-#define _VLAN_INPUT(ifp, eh, m) do { \
+#define _VLAN_INPUT(eh, m) do { \
if (vlan_input_p != NULL) { \
if ((*vlan_input_p)(eh, m) == -1) \
- (ifp)->if_noproto++; \
+ (m)->m_pkthdr.rcvif->if_noproto++; \
} else { \
m_free(m); \
- (ifp)->if_noproto++; \
+ (m)->m_pkthdr.rcvif->if_noproto++; \
} \
} while (0)
-#define VLAN_INPUT(ifp, eh, m) do { \
+#define VLAN_INPUT(eh, m) do { \
/* XXX: lock */ \
- _VLAN_INPUT(ifp, eh, m); \
+ _VLAN_INPUT(eh, m); \
/* XXX: unlock */ \
} while (0)
-#define _VLAN_INPUT_TAG(ifp, eh, m, t) do { \
+#define _VLAN_INPUT_TAG(eh, m, t) do { \
if (vlan_input_tag_p != NULL) { \
if ((*vlan_input_tag_p)(eh, m, t) == -1) \
- (ifp)->if_noproto++; \
+ (m)->m_pkthdr.rcvif->if_noproto++; \
} else { \
m_free(m); \
- (ifp)->if_noproto++; \
+ (m)->m_pkthdr.rcvif->if_noproto++; \
} \
} while (0)
-#define VLAN_INPUT_TAG(ifp, eh, m, t) do { \
+#define VLAN_INPUT_TAG(eh, m, t) do { \
/* XXX: lock */ \
- _VLAN_INPUT_TAG(ifp, eh, m, t); \
+ _VLAN_INPUT_TAG(eh, m, t); \
/* XXX: unlock */ \
} while (0)
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 4f445d2..3351c22 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -570,7 +570,7 @@ ether_demux(ifp, eh, m)
return;
#endif /* NETATALK */
case ETHERTYPE_VLAN:
- VLAN_INPUT(ifp, eh, m);
+ VLAN_INPUT(eh, m);
return;
default:
#ifdef IPX
OpenPOWER on IntegriCloud