aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2011-07-03 16:08:38 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2011-07-03 16:08:38 +0000
commita34c6aeb850016c35e415e12bf3c3443c0a8734d (patch)
tree5b26fb6f45285f3368af628d56f5ce11128abe81 /sys/dev
parent43deddcdfe3dabcfe25858c136d1a654cbcd3020 (diff)
downloadsrc-a34c6aeb850016c35e415e12bf3c3443c0a8734d.tar.gz
src-a34c6aeb850016c35e415e12bf3c3443c0a8734d.zip
Tag mbufs of all incoming frames or packets with the interface's FIB
setting (either default or if supported as set by SIOCSIFFIB, e.g. from ifconfig). Submitted by: Alexander V. Chernikov (melifaro ipfw.ru) Reviewed by: julian MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=223741
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/iicbus/if_ic.c1
-rw-r--r--sys/dev/lmc/if_lmc.c1
-rw-r--r--sys/dev/ppbus/if_plip.c4
-rw-r--r--sys/dev/usb/net/uhso.c1
4 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/iicbus/if_ic.c b/sys/dev/iicbus/if_ic.c
index 6ac6401cb1f2..fd072c123734 100644
--- a/sys/dev/iicbus/if_ic.c
+++ b/sys/dev/iicbus/if_ic.c
@@ -308,6 +308,7 @@ icintr(device_t dev, int event, char *ptr)
top = m_devget(sc->ic_ifbuf + ICHDRLEN, len, 0, sc->ic_ifp, 0);
if (top) {
mtx_unlock(&sc->ic_lock);
+ M_SETFIB(top, sc->ic_ifp->if_fib);
netisr_dispatch(NETISR_IP, top);
mtx_lock(&sc->ic_lock);
}
diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c
index 604e8df0d93c..d5fb9ba89fb2 100644
--- a/sys/dev/lmc/if_lmc.c
+++ b/sys/dev/lmc/if_lmc.c
@@ -2527,6 +2527,7 @@ lmc_raw_input(struct ifnet *ifp, struct mbuf *mbuf)
{
softc_t *sc = IFP2SC(ifp);
+ M_SETFIB(mbuf, ifp->if_fib);
# if INET
if (mbuf->m_data[0]>>4 == 4)
netisr_dispatch(NETISR_IP, mbuf);
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c
index fc81aec97b81..281baf2e0e56 100644
--- a/sys/dev/ppbus/if_plip.c
+++ b/sys/dev/ppbus/if_plip.c
@@ -585,6 +585,8 @@ lp_intr(void *arg)
if (bpf_peers_present(sc->sc_ifp->if_bpf))
lptap(sc->sc_ifp, top);
+ M_SETFIB(top, sc->sc_ifp->if_fib);
+
/* mbuf is free'd on failure. */
netisr_queue(NETISR_IP, top);
ppb_lock(ppbus);
@@ -637,6 +639,8 @@ lp_intr(void *arg)
if (bpf_peers_present(sc->sc_ifp->if_bpf))
lptap(sc->sc_ifp, top);
+ M_SETFIB(top, sc->sc_ifp->if_fib);
+
/* mbuf is free'd on failure. */
netisr_queue(NETISR_IP, top);
ppb_lock(ppbus);
diff --git a/sys/dev/usb/net/uhso.c b/sys/dev/usb/net/uhso.c
index ab1309353747..cbb0b087b143 100644
--- a/sys/dev/usb/net/uhso.c
+++ b/sys/dev/usb/net/uhso.c
@@ -1754,6 +1754,7 @@ uhso_if_rxflush(void *arg)
/* Dispatch to IP layer */
BPF_MTAP(sc->sc_ifp, m);
+ M_SETFIB(m, ifp->if_fib);
netisr_dispatch(isr, m);
m = m0 != NULL ? m0 : NULL;
mtx_lock(&sc->sc_mtx);