Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Feb 2012 13:15:11 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r231380 - in stable/8/sys: dev/iicbus dev/lmc dev/ppbus dev/usb/net net netgraph
Message-ID:  <201202101315.q1ADFBxS074767@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Fri Feb 10 13:15:11 2012
New Revision: 231380
URL: http://svn.freebsd.org/changeset/base/231380

Log:
  MFC r223741:
  
   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

Modified:
  stable/8/sys/dev/iicbus/if_ic.c
  stable/8/sys/dev/lmc/if_lmc.c
  stable/8/sys/dev/ppbus/if_plip.c
  stable/8/sys/dev/usb/net/uhso.c
  stable/8/sys/net/if_arcsubr.c
  stable/8/sys/net/if_atmsubr.c
  stable/8/sys/net/if_ethersubr.c
  stable/8/sys/net/if_fddisubr.c
  stable/8/sys/net/if_fwsubr.c
  stable/8/sys/net/if_gif.c
  stable/8/sys/net/if_iso88025subr.c
  stable/8/sys/net/if_spppfr.c
  stable/8/sys/net/if_spppsubr.c
  stable/8/sys/net/if_stf.c
  stable/8/sys/net/if_tun.c
  stable/8/sys/netgraph/ng_iface.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/dev/iicbus/if_ic.c
==============================================================================
--- stable/8/sys/dev/iicbus/if_ic.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/dev/iicbus/if_ic.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -311,6 +311,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: stable/8/sys/dev/lmc/if_lmc.c
==============================================================================
--- stable/8/sys/dev/lmc/if_lmc.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/dev/lmc/if_lmc.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -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: stable/8/sys/dev/ppbus/if_plip.c
==============================================================================
--- stable/8/sys/dev/ppbus/if_plip.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/dev/ppbus/if_plip.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -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: stable/8/sys/dev/usb/net/uhso.c
==============================================================================
--- stable/8/sys/dev/usb/net/uhso.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/dev/usb/net/uhso.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -1756,6 +1756,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: stable/8/sys/net/if_arcsubr.c
==============================================================================
--- stable/8/sys/net/if_arcsubr.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/net/if_arcsubr.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -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: stable/8/sys/net/if_atmsubr.c
==============================================================================
--- stable/8/sys/net/if_atmsubr.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/net/if_atmsubr.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -332,6 +332,7 @@ atm_input(struct ifnet *ifp, struct atm_
 			return;
 		}
 	}
+	M_SETFIB(m, ifp->if_fib);
 	netisr_dispatch(isr, m);
 }
 

Modified: stable/8/sys/net/if_ethersubr.c
==============================================================================
--- stable/8/sys/net/if_ethersubr.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/net/if_ethersubr.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -692,6 +692,8 @@ ether_input(struct ifnet *ifp, struct mb
 		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: stable/8/sys/net/if_fddisubr.c
==============================================================================
--- stable/8/sys/net/if_fddisubr.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/net/if_fddisubr.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -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: stable/8/sys/net/if_fwsubr.c
==============================================================================
--- stable/8/sys/net/if_fwsubr.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/net/if_fwsubr.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -627,6 +627,7 @@ firewire_input(struct ifnet *ifp, struct
 		return;
 	}
 
+	M_SETFIB(m, ifp->if_fib);
 	netisr_dispatch(isr, m);
 }
 

Modified: stable/8/sys/net/if_gif.c
==============================================================================
--- stable/8/sys/net/if_gif.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/net/if_gif.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -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: stable/8/sys/net/if_iso88025subr.c
==============================================================================
--- stable/8/sys/net/if_iso88025subr.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/net/if_iso88025subr.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -680,6 +680,7 @@ iso88025_input(ifp, m)
 		break;
 	}
 
+	M_SETFIB(m, ifp->if_fib);
 	netisr_dispatch(isr, m);
 	return;
 

Modified: stable/8/sys/net/if_spppfr.c
==============================================================================
--- stable/8/sys/net/if_spppfr.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/net/if_spppfr.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -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: stable/8/sys/net/if_spppsubr.c
==============================================================================
--- stable/8/sys/net/if_spppsubr.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/net/if_spppsubr.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -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: stable/8/sys/net/if_stf.c
==============================================================================
--- stable/8/sys/net/if_stf.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/net/if_stf.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -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: stable/8/sys/net/if_tun.c
==============================================================================
--- stable/8/sys/net/if_tun.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/net/if_tun.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -930,6 +930,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: stable/8/sys/netgraph/ng_iface.c
==============================================================================
--- stable/8/sys/netgraph/ng_iface.c	Fri Feb 10 12:40:50 2012	(r231379)
+++ stable/8/sys/netgraph/ng_iface.c	Fri Feb 10 13:15:11 2012	(r231380)
@@ -781,6 +781,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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202101315.q1ADFBxS074767>