Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Feb 2012 16:05:34 +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-7@freebsd.org
Subject:   svn commit: r231390 - in stable/7/sys: dev/iicbus dev/lmc dev/ppbus net netgraph
Message-ID:  <201202101605.q1AG5YPw082579@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Fri Feb 10 16:05:33 2012
New Revision: 231390
URL: http://svn.freebsd.org/changeset/base/231390

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/7/sys/dev/iicbus/if_ic.c
  stable/7/sys/dev/lmc/if_lmc.c
  stable/7/sys/dev/ppbus/if_plip.c
  stable/7/sys/net/if_arcsubr.c
  stable/7/sys/net/if_atmsubr.c
  stable/7/sys/net/if_ethersubr.c
  stable/7/sys/net/if_fddisubr.c
  stable/7/sys/net/if_fwsubr.c
  stable/7/sys/net/if_gif.c
  stable/7/sys/net/if_iso88025subr.c
  stable/7/sys/net/if_spppfr.c
  stable/7/sys/net/if_spppsubr.c
  stable/7/sys/net/if_stf.c
  stable/7/sys/net/if_tun.c
  stable/7/sys/netgraph/ng_iface.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/iicbus/if_ic.c
==============================================================================
--- stable/7/sys/dev/iicbus/if_ic.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/dev/iicbus/if_ic.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -300,6 +300,7 @@ icintr(device_t dev, int event, char *pt
 		BPF_TAP(sc->ic_ifp, sc->ic_ifbuf, len + ICHDRLEN);
 		top = m_devget(sc->ic_ifbuf + ICHDRLEN, len, 0, sc->ic_ifp, 0);
 		if (top)
+			M_SETFIB(top, sc->ic_ifp->if_fib);
 			netisr_dispatch(NETISR_IP, top);
 		break;
 	err:

Modified: stable/7/sys/dev/lmc/if_lmc.c
==============================================================================
--- stable/7/sys/dev/lmc/if_lmc.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/dev/lmc/if_lmc.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -2526,6 +2526,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/7/sys/dev/ppbus/if_plip.c
==============================================================================
--- stable/7/sys/dev/ppbus/if_plip.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/dev/ppbus/if_plip.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -516,6 +516,9 @@ lp_intr (void *arg)
 	    if (top) {
 		if (bpf_peers_present(sc->sc_ifp->if_bpf))
 		    lptap(sc->sc_ifp, top);
+
+		M_SETFIB(top, sc->sc_ifp->if_fib);
+
 		netisr_queue(NETISR_IP, top);	/* mbuf is free'd on failure. */
 	    }
 	    goto done;
@@ -561,6 +564,9 @@ lp_intr (void *arg)
 	    if (top) {
 		if (bpf_peers_present(sc->sc_ifp->if_bpf))
 		    lptap(sc->sc_ifp, top);
+
+		M_SETFIB(top, sc->sc_ifp->if_fib);
+
 		netisr_queue(NETISR_IP, top);	/* mbuf is free'd on failure. */
 	    }
 	}

Modified: stable/7/sys/net/if_arcsubr.c
==============================================================================
--- stable/7/sys/net/if_arcsubr.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/net/if_arcsubr.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -603,6 +603,7 @@ arc_input(struct ifnet *ifp, struct mbuf
 		m_freem(m);
 		return;
 	}
+	M_SETFIB(m, ifp->if_fib);
 	netisr_dispatch(isr, m);
 }
 

Modified: stable/7/sys/net/if_atmsubr.c
==============================================================================
--- stable/7/sys/net/if_atmsubr.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/net/if_atmsubr.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -344,6 +344,7 @@ atm_input(struct ifnet *ifp, struct atm_
 			return;
 		}
 	}
+	M_SETFIB(m, ifp->if_fib);
 	netisr_dispatch(isr, m);
 }
 

Modified: stable/7/sys/net/if_ethersubr.c
==============================================================================
--- stable/7/sys/net/if_ethersubr.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/net/if_ethersubr.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -635,6 +635,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/7/sys/net/if_fddisubr.c
==============================================================================
--- stable/7/sys/net/if_fddisubr.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/net/if_fddisubr.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -543,6 +543,7 @@ fddi_input(ifp, m)
 		ifp->if_noproto++;
 		goto dropanyway;
 	}
+	M_SETFIB(m, ifp->if_fib);
 	netisr_dispatch(isr, m);
 	return;
 

Modified: stable/7/sys/net/if_fwsubr.c
==============================================================================
--- stable/7/sys/net/if_fwsubr.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/net/if_fwsubr.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -632,6 +632,7 @@ firewire_input(struct ifnet *ifp, struct
 		return;
 	}
 
+	M_SETFIB(m, ifp->if_fib);
 	netisr_dispatch(isr, m);
 }
 

Modified: stable/7/sys/net/if_gif.c
==============================================================================
--- stable/7/sys/net/if_gif.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/net/if_gif.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -603,6 +603,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/7/sys/net/if_iso88025subr.c
==============================================================================
--- stable/7/sys/net/if_iso88025subr.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/net/if_iso88025subr.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -680,6 +680,7 @@ iso88025_input(ifp, m)
 		break;
 	}
 
+	M_SETFIB(m, ifp->if_fib);
 	netisr_dispatch(isr, m);
 	return;
 

Modified: stable/7/sys/net/if_spppfr.c
==============================================================================
--- stable/7/sys/net/if_spppfr.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/net/if_spppfr.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -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/7/sys/net/if_spppsubr.c
==============================================================================
--- stable/7/sys/net/if_spppsubr.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/net/if_spppsubr.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -779,6 +779,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/7/sys/net/if_stf.c
==============================================================================
--- stable/7/sys/net/if_stf.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/net/if_stf.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -766,6 +766,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/7/sys/net/if_tun.c
==============================================================================
--- stable/7/sys/net/if_tun.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/net/if_tun.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -921,6 +921,7 @@ tunwrite(struct cdev *dev, struct uio *u
 		random_harvest(m, 16, 3, 0, RANDOM_NET);
 	ifp->if_ibytes += m->m_pkthdr.len;
 	ifp->if_ipackets++;
+	M_SETFIB(m, ifp->if_fib);
 	netisr_dispatch(isr, m);
 	return (0);
 }

Modified: stable/7/sys/netgraph/ng_iface.c
==============================================================================
--- stable/7/sys/netgraph/ng_iface.c	Fri Feb 10 15:54:39 2012	(r231389)
+++ stable/7/sys/netgraph/ng_iface.c	Fri Feb 10 16:05:33 2012	(r231390)
@@ -774,6 +774,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?201202101605.q1AG5YPw082579>