the second (unused) argument of the input packet handlers.
ok dlg@
-/* $OpenBSD: if.c,v 1.334 2015/05/26 11:36:26 dlg Exp $ */
+/* $OpenBSD: if.c,v 1.335 2015/05/26 11:39:07 mpi Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
*/
ifp = m->m_pkthdr.rcvif;
SLIST_FOREACH(ifih, &ifp->if_inputs, ifih_next) {
- if ((*ifih->ifih_input)(m, NULL))
+ if ((*ifih->ifih_input)(m))
break;
/* Pseudo-drivers might be stacked. */
-/* $OpenBSD: if_ethersubr.c,v 1.200 2015/05/26 11:36:26 dlg Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.201 2015/05/26 11:39:07 mpi Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
* the ether header, which is provided separately.
*/
int
-ether_input(struct mbuf *m, void *hdr)
+ether_input(struct mbuf *m)
{
struct ifnet *ifp;
- struct ether_header *eh = hdr;
+ struct ether_header *eh;
struct niqueue *inq;
u_int16_t etype;
int llcfound = 0;
struct ether_header *eh_tmp;
#endif
-
- /* mark incoming routing table */
ifp = m->m_pkthdr.rcvif;
- m->m_pkthdr.ph_rtableid = ifp->if_rdomain;
-
- if (eh == NULL) {
- eh = mtod(m, struct ether_header *);
- m_adj(m, ETHER_HDR_LEN);
- }
-
if ((ifp->if_flags & IFF_UP) == 0) {
m_freem(m);
return (1);
}
+
+ eh = mtod(m, struct ether_header *);
+ m_adj(m, ETHER_HDR_LEN);
+
if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
/*
* If this is not a simplex interface, drop the packet
-/* $OpenBSD: if_trunk.c,v 1.99 2015/05/15 10:15:13 mpi Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.100 2015/05/26 11:39:07 mpi Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
void trunk_ether_purgemulti(struct trunk_softc *);
int trunk_ether_cmdmulti(struct trunk_port *, u_long);
int trunk_ioctl_allports(struct trunk_softc *, u_long, caddr_t);
-int trunk_input(struct mbuf *, void *);
+int trunk_input(struct mbuf *);
void trunk_start(struct ifnet *);
void trunk_init(struct ifnet *);
void trunk_stop(struct ifnet *);
}
int
-trunk_input(struct mbuf *m, void *hdr)
+trunk_input(struct mbuf *m)
{
struct ifnet *ifp;
struct trunk_softc *tr;
struct trunk_port *tp;
struct ifnet *trifp = NULL;
- struct ether_header *eh = hdr;
+ struct ether_header *eh;
int error;
ifp = m->m_pkthdr.rcvif;
-
- if (eh == NULL)
- eh = mtod(m, struct ether_header *);
+ eh = mtod(m, struct ether_header *);
if (ETHER_IS_MULTICAST(eh->ether_dhost))
ifp->if_imcasts++;
-/* $OpenBSD: if_trunk.h,v 1.22 2015/05/14 10:55:28 mpi Exp $ */
+/* $OpenBSD: if_trunk.h,v 1.23 2015/05/26 11:39:07 mpi Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
struct trunk_port *lb_ports[TRUNK_MAX_PORTS];
};
-int trunk_input(struct mbuf *, void *);
int trunk_enqueue(struct ifnet *, struct mbuf *);
u_int32_t trunk_hashmbuf(struct mbuf *, SIPHASH_KEY *);
#endif /* _KERNEL */
-/* $OpenBSD: if_var.h,v 1.29 2015/05/19 11:09:24 mpi Exp $ */
+/* $OpenBSD: if_var.h,v 1.30 2015/05/26 11:39:07 mpi Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
*/
struct ifih {
SLIST_ENTRY(ifih) ifih_next;
- int (*ifih_input)(struct mbuf *, void *);
+ int (*ifih_input)(struct mbuf *);
int ifih_refcnt;
};
void ether_ifattach(struct ifnet *);
void ether_ifdetach(struct ifnet *);
int ether_ioctl(struct ifnet *, struct arpcom *, u_long, caddr_t);
-int ether_input(struct mbuf *, void *);
+int ether_input(struct mbuf *);
int ether_output(struct ifnet *,
struct mbuf *, struct sockaddr *, struct rtentry *);
char *ether_sprintf(u_char *);
-/* $OpenBSD: if_vlan.c,v 1.125 2015/05/26 03:01:54 dlg Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.126 2015/05/26 11:39:07 mpi Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
LIST_HEAD(vlan_taghash, ifvlan) *vlan_tagh, *svlan_tagh;
-int vlan_input(struct mbuf *, void *);
+int vlan_input(struct mbuf *);
int vlan_output(struct ifnet *, struct mbuf *, struct sockaddr *,
struct rtentry *);
void vlan_start(struct ifnet *ifp);
* vlan_input() returns 1 if it has consumed the packet, 0 otherwise.
*/
int
-vlan_input(struct mbuf *m, void *hdr)
+vlan_input(struct mbuf *m)
{
struct ifvlan *ifv;
struct ifnet *ifp;