svn commit: r223741 - in head/sys: dev/iicbus dev/lmc dev/ppbus
dev/usb/net net netgraph
Bjoern A. Zeeb
bz at FreeBSD.org
Sun Jul 3 16:08:38 UTC 2011
Author: bz
Date: Sun Jul 3 16:08:38 2011
New Revision: 223741
URL: http://svn.freebsd.org/changeset/base/223741
Log:
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
Modified:
head/sys/dev/iicbus/if_ic.c
head/sys/dev/lmc/if_lmc.c
head/sys/dev/ppbus/if_plip.c
head/sys/dev/usb/net/uhso.c
head/sys/net/if_arcsubr.c
head/sys/net/if_atmsubr.c
head/sys/net/if_ethersubr.c
head/sys/net/if_fddisubr.c
head/sys/net/if_fwsubr.c
head/sys/net/if_gif.c
head/sys/net/if_iso88025subr.c
head/sys/net/if_spppfr.c
head/sys/net/if_spppsubr.c
head/sys/net/if_stf.c
head/sys/net/if_tun.c
head/sys/netgraph/ng_iface.c
Modified: head/sys/dev/iicbus/if_ic.c
==============================================================================
--- head/sys/dev/iicbus/if_ic.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/dev/iicbus/if_ic.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -308,6 +308,7 @@ icintr(device_t dev, int event, char *pt
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);
}
Modified: head/sys/dev/lmc/if_lmc.c
==============================================================================
--- head/sys/dev/lmc/if_lmc.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/dev/lmc/if_lmc.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -2527,6 +2527,7 @@ lmc_raw_input(struct ifnet *ifp, struct
{
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);
Modified: head/sys/dev/ppbus/if_plip.c
==============================================================================
--- head/sys/dev/ppbus/if_plip.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/dev/ppbus/if_plip.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -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);
Modified: head/sys/dev/usb/net/uhso.c
==============================================================================
--- head/sys/dev/usb/net/uhso.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/dev/usb/net/uhso.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -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);
Modified: head/sys/net/if_arcsubr.c
==============================================================================
--- head/sys/net/if_arcsubr.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/net/if_arcsubr.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -608,6 +608,7 @@ arc_input(struct ifnet *ifp, struct mbuf
m_freem(m);
return;
}
+ M_SETFIB(m, ifp->if_fib);
netisr_dispatch(isr, m);
}
Modified: head/sys/net/if_atmsubr.c
==============================================================================
--- head/sys/net/if_atmsubr.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/net/if_atmsubr.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -332,6 +332,7 @@ atm_input(struct ifnet *ifp, struct atm_
return;
}
}
+ M_SETFIB(m, ifp->if_fib);
netisr_dispatch(isr, m);
}
Modified: head/sys/net/if_ethersubr.c
==============================================================================
--- head/sys/net/if_ethersubr.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/net/if_ethersubr.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -692,6 +692,8 @@ ether_input_internal(struct ifnet *ifp,
m_adj(m, ETHER_VLAN_ENCAP_LEN);
}
+ M_SETFIB(m, ifp->if_fib);
+
/* Allow ng_ether(4) to claim this frame. */
if (IFP2AC(ifp)->ac_netgraph != NULL) {
KASSERT(ng_ether_input_p != NULL,
Modified: head/sys/net/if_fddisubr.c
==============================================================================
--- head/sys/net/if_fddisubr.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/net/if_fddisubr.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -550,6 +550,7 @@ fddi_input(ifp, m)
ifp->if_noproto++;
goto dropanyway;
}
+ M_SETFIB(m, ifp->if_fib);
netisr_dispatch(isr, m);
return;
Modified: head/sys/net/if_fwsubr.c
==============================================================================
--- head/sys/net/if_fwsubr.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/net/if_fwsubr.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -627,6 +627,7 @@ firewire_input(struct ifnet *ifp, struct
return;
}
+ M_SETFIB(m, ifp->if_fib);
netisr_dispatch(isr, m);
}
Modified: head/sys/net/if_gif.c
==============================================================================
--- head/sys/net/if_gif.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/net/if_gif.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -609,6 +609,7 @@ gif_input(m, af, ifp)
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
+ M_SETFIB(m, ifp->if_fib);
netisr_dispatch(isr, m);
}
Modified: head/sys/net/if_iso88025subr.c
==============================================================================
--- head/sys/net/if_iso88025subr.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/net/if_iso88025subr.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -680,6 +680,7 @@ iso88025_input(ifp, m)
break;
}
+ M_SETFIB(m, ifp->if_fib);
netisr_dispatch(isr, m);
return;
Modified: head/sys/net/if_spppfr.c
==============================================================================
--- head/sys/net/if_spppfr.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/net/if_spppfr.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -280,6 +280,8 @@ drop: ++ifp->if_ierrors;
if (! (ifp->if_flags & IFF_UP))
goto drop;
+ M_SETFIB(m, ifp->if_fib);
+
/* Check queue. */
if (netisr_queue(isr, m)) { /* (0) on success. */
if (debug)
Modified: head/sys/net/if_spppsubr.c
==============================================================================
--- head/sys/net/if_spppsubr.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/net/if_spppsubr.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -737,6 +737,7 @@ sppp_input(struct ifnet *ifp, struct mbu
goto drop;
SPPP_UNLOCK(sp);
+ M_SETFIB(m, ifp->if_fib);
/* Check queue. */
if (netisr_queue(isr, m)) { /* (0) on success. */
if (debug)
Modified: head/sys/net/if_stf.c
==============================================================================
--- head/sys/net/if_stf.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/net/if_stf.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -781,6 +781,7 @@ in_stf_input(m, off)
*/
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
+ M_SETFIB(m, ifp->if_fib);
netisr_dispatch(NETISR_IPV6, m);
}
Modified: head/sys/net/if_tun.c
==============================================================================
--- head/sys/net/if_tun.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/net/if_tun.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -929,6 +929,7 @@ tunwrite(struct cdev *dev, struct uio *u
ifp->if_ibytes += m->m_pkthdr.len;
ifp->if_ipackets++;
CURVNET_SET(ifp->if_vnet);
+ M_SETFIB(m, ifp->if_fib);
netisr_dispatch(isr, m);
CURVNET_RESTORE();
return (0);
Modified: head/sys/netgraph/ng_iface.c
==============================================================================
--- head/sys/netgraph/ng_iface.c Sun Jul 3 15:40:47 2011 (r223740)
+++ head/sys/netgraph/ng_iface.c Sun Jul 3 16:08:38 2011 (r223741)
@@ -777,6 +777,7 @@ ng_iface_rcvdata(hook_p hook, item_p ite
/* First chunk of an mbuf contains good junk */
if (harvest.point_to_point)
random_harvest(m, 16, 3, 0, RANDOM_NET);
+ M_SETFIB(m, ifp->if_fib);
netisr_dispatch(isr, m);
return (0);
}
More information about the svn-src-all
mailing list