Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Dec 2008 06:10:57 +0000 (UTC)
From:      Qing Li <qingli@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186119 - in head: . contrib/bsnmp/snmp_mibII contrib/ipfilter/ipsend lib/libstand libexec/bootpd release/picobsd/tinyware/ns sbin/route sbin/routed share/man/man4 share/man/man9 sys/co...
Message-ID:  <200812150610.mBF6AvM9086332@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: qingli
Date: Mon Dec 15 06:10:57 2008
New Revision: 186119
URL: http://svn.freebsd.org/changeset/base/186119

Log:
  This main goals of this project are:
  1. separating L2 tables (ARP, NDP) from the L3 routing tables
  2. removing as much locking dependencies among these layers as
     possible to allow for some parallelism in the search operations
  3. simplify the logic in the routing code,
  
  The most notable end result is the obsolescent of the route
  cloning (RTF_CLONING) concept, which translated into code reduction
  in both IPv4 ARP and IPv6 NDP related modules, and size reduction in
  struct rtentry{}. The change in design obsoletes the semantics of
  RTF_CLONING, RTF_WASCLONE and RTF_LLINFO routing flags. The userland
  applications such as "arp" and "ndp" have been modified to reflect
  those changes. The output from "netstat -r" shows only the routing
  entries.
  
  Quite a few developers have contributed to this project in the
  past: Glebius Smirnoff, Luigi Rizzo, Alessandro Cerri, and
  Andre Oppermann. And most recently:
  
  - Kip Macy revised the locking code completely, thus completing
    the last piece of the puzzle, Kip has also been conducting
    active functional testing
  - Sam Leffler has helped me improving/refactoring the code, and
    provided valuable reviews
  - Julian Elischer setup the perforce tree for me and has helped
    me maintaining that branch before the svn conversion

Modified:
  head/UPDATING
  head/contrib/bsnmp/snmp_mibII/mibII.c
  head/contrib/bsnmp/snmp_mibII/mibII_route.c
  head/contrib/ipfilter/ipsend/44arp.c
  head/lib/libstand/if_ether.h
  head/libexec/bootpd/rtmsg.c
  head/release/picobsd/tinyware/ns/ns.c
  head/sbin/route/route.c
  head/sbin/routed/table.c
  head/share/man/man4/route.4
  head/share/man/man9/rtalloc.9
  head/share/man/man9/rtentry.9
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/contrib/pf/net/pf.c
  head/sys/contrib/rdma/rdma_addr.c
  head/sys/dev/cxgb/ulp/tom/cxgb_l2t.c
  head/sys/dev/cxgb/ulp/tom/cxgb_l2t.h
  head/sys/modules/cxgb/Makefile
  head/sys/net/if.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_iso88025subr.c
  head/sys/net/if_var.h
  head/sys/net/radix_mpath.c
  head/sys/net/route.c
  head/sys/net/route.h
  head/sys/net/rtsock.c
  head/sys/netgraph/netflow/netflow.c
  head/sys/netinet/if_atm.c
  head/sys/netinet/if_ether.c
  head/sys/netinet/if_ether.h
  head/sys/netinet/in.c
  head/sys/netinet/in_mcast.c
  head/sys/netinet/in_pcb.c
  head/sys/netinet/in_proto.c
  head/sys/netinet/in_rmx.c
  head/sys/netinet/in_var.h
  head/sys/netinet/ip_carp.c
  head/sys/netinet/ip_fastfwd.c
  head/sys/netinet/ip_fw2.c
  head/sys/netinet/ip_input.c
  head/sys/netinet/ip_output.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet6/icmp6.c
  head/sys/netinet6/in6.c
  head/sys/netinet6/in6_rmx.c
  head/sys/netinet6/in6_src.c
  head/sys/netinet6/in6_var.h
  head/sys/netinet6/ip6_input.c
  head/sys/netinet6/ip6_output.c
  head/sys/netinet6/ip6_var.h
  head/sys/netinet6/nd6.c
  head/sys/netinet6/nd6.h
  head/sys/netinet6/nd6_nbr.c
  head/sys/netinet6/nd6_rtr.c
  head/sys/netinet6/vinet6.h
  head/sys/sys/param.h
  head/usr.bin/netstat/route.c
  head/usr.sbin/arp/arp.c
  head/usr.sbin/ndp/ndp.c
  head/usr.sbin/ppp/route.c
  head/usr.sbin/route6d/route6d.c

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/UPDATING	Mon Dec 15 06:10:57 2008	(r186119)
@@ -22,6 +22,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
 	to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20081214:
+	__FreeBSD_version 800059 incorporates the new arp-v2 rewrite.
+	RTF_CLONING, RTF_LLINFO and RTF_WASCLONED flags are eliminated.
+	The new code reduced struct rtentry{} by 16 bytes on 32-bit 
+	architecture and 40 bytes on 64-bit architecture. The userland
+	applications "arp" and "ndp" have been updated accordingly.
+	The output from "netstat -r" shows only routing entries and
+	none of the L2 information.
+
 20081130:
 	__FreeBSD_version 800057 marks the switchover from the
 	binary ath hal to source code. Users must add the line:

Modified: head/contrib/bsnmp/snmp_mibII/mibII.c
==============================================================================
--- head/contrib/bsnmp/snmp_mibII/mibII.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/contrib/bsnmp/snmp_mibII/mibII.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -48,8 +48,7 @@ static void *route_fd;
 /* if-index allocator */
 static uint32_t next_if_index = 1;
 
-/* re-fetch arp table */
-static int update_arp;
+/* currently fetching the arp table */
 static int in_update_arp;
 
 /* OR registrations */
@@ -911,36 +910,6 @@ mib_find_ifa(struct in_addr addr)
 }
 
 /*
- * Process a new ARP entry
- */
-static void
-process_arp(const struct rt_msghdr *rtm, const struct sockaddr_dl *sdl,
-    const struct sockaddr_in *sa)
-{
-	struct mibif *ifp;
-	struct mibarp *at;
-
-	/* IP arp table entry */
-	if (sdl->sdl_alen == 0) {
-		update_arp = 1;
-		return;
-	}
-	if ((ifp = mib_find_if_sys(sdl->sdl_index)) == NULL)
-		return;
-	/* have a valid entry */
-	if ((at = mib_find_arp(ifp, sa->sin_addr)) == NULL &&
-	    (at = mib_arp_create(ifp, sa->sin_addr,
-	    sdl->sdl_data + sdl->sdl_nlen, sdl->sdl_alen)) == NULL)
-		return;
-
-	if (rtm->rtm_rmx.rmx_expire == 0)
-		at->flags |= MIBARP_PERM;
-	else
-		at->flags &= ~MIBARP_PERM;
-	at->flags |= MIBARP_FOUND;
-}
-
-/*
  * Handle a routing socket message.
  */
 static void
@@ -1080,46 +1049,12 @@ handle_rtmsg(struct rt_msghdr *rtm)
 		}
 		break;
 #endif
-
 	  case RTM_GET:
-		mib_extract_addrs(rtm->rtm_addrs, (u_char *)(rtm + 1), addrs);
-		if (rtm->rtm_flags & RTF_LLINFO) {
-			if (addrs[RTAX_DST] == NULL ||
-			    addrs[RTAX_GATEWAY] == NULL ||
-			    addrs[RTAX_DST]->sa_family != AF_INET ||
-			    addrs[RTAX_GATEWAY]->sa_family != AF_LINK)
-				break;
-			process_arp(rtm,
-			    (struct sockaddr_dl *)(void *)addrs[RTAX_GATEWAY],
-			    (struct sockaddr_in *)(void *)addrs[RTAX_DST]);
-		} else {
-			if (rtm->rtm_errno == 0 && (rtm->rtm_flags & RTF_UP))
-				mib_sroute_process(rtm, addrs[RTAX_GATEWAY],
-				    addrs[RTAX_DST], addrs[RTAX_NETMASK]);
-		}
-		break;
-
 	  case RTM_ADD:
-		mib_extract_addrs(rtm->rtm_addrs, (u_char *)(rtm + 1), addrs);
-		if (rtm->rtm_flags & RTF_LLINFO) {
-			if (addrs[RTAX_DST] == NULL ||
-			    addrs[RTAX_GATEWAY] == NULL ||
-			    addrs[RTAX_DST]->sa_family != AF_INET ||
-			    addrs[RTAX_GATEWAY]->sa_family != AF_LINK)
-				break;
-			process_arp(rtm,
-			    (struct sockaddr_dl *)(void *)addrs[RTAX_GATEWAY],
-			    (struct sockaddr_in *)(void *)addrs[RTAX_DST]);
-		} else {
-			if (rtm->rtm_errno == 0 && (rtm->rtm_flags & RTF_UP))
-				mib_sroute_process(rtm, addrs[RTAX_GATEWAY],
-				    addrs[RTAX_DST], addrs[RTAX_NETMASK]);
-		}
-		break;
-
 	  case RTM_DELETE:
 		mib_extract_addrs(rtm->rtm_addrs, (u_char *)(rtm + 1), addrs);
-		if (rtm->rtm_errno == 0 && !(rtm->rtm_flags & RTF_LLINFO))
+
+		if (rtm->rtm_errno == 0 && (rtm->rtm_flags & RTF_UP))
 			mib_sroute_process(rtm, addrs[RTAX_GATEWAY],
 			    addrs[RTAX_DST], addrs[RTAX_NETMASK]);
 		break;
@@ -1289,7 +1224,8 @@ update_ifa_info(void)
 
 /*
  * Update arp table
- */
+ *
+*/
 void
 mib_arp_update(void)
 {
@@ -1305,11 +1241,11 @@ mib_arp_update(void)
 	TAILQ_FOREACH(at, &mibarp_list, link)
 		at->flags &= ~MIBARP_FOUND;
 
-	if ((buf = mib_fetch_rtab(AF_INET, NET_RT_FLAGS, RTF_LLINFO, &needed)) == NULL) {
+	if ((buf = mib_fetch_rtab(AF_INET, NET_RT_FLAGS, 0, &needed)) == NULL) {
 		in_update_arp = 0;
 		return;
 	}
-
+	
 	next = buf;
 	while (next < buf + needed) {
 		rtm = (struct rt_msghdr *)(void *)next;
@@ -1326,7 +1262,6 @@ mib_arp_update(void)
 		at = at1;
 	}
 	mibarpticks = get_ticks();
-	update_arp = 0;
 	in_update_arp = 0;
 }
 
@@ -1634,8 +1569,8 @@ mibII_idle(void)
 		mib_arp_update();
 		mib_iflist_bad = 0;
 	}
-	if (update_arp)
-		mib_arp_update();
+
+	mib_arp_update();
 }
 
 

Modified: head/contrib/bsnmp/snmp_mibII/mibII_route.c
==============================================================================
--- head/contrib/bsnmp/snmp_mibII/mibII_route.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/contrib/bsnmp/snmp_mibII/mibII_route.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -186,8 +186,7 @@ mib_sroute_process(struct rt_msghdr *rtm
 	memcpy(r->index, key.index, sizeof(r->index));
 	r->ifindex = (ifp == NULL) ? 0 : ifp->index;
 
-	r->type = (rtm->rtm_flags & RTF_LLINFO) ? 3 :
-	    (rtm->rtm_flags & RTF_REJECT) ? 2 : 4;
+	r->type = (rtm->rtm_flags & RTF_REJECT) ? 2 : 4;
 
 	/* cannot really know, what protocol it runs */
 	r->proto = (rtm->rtm_flags & RTF_LOCAL) ? 2 :

Modified: head/contrib/ipfilter/ipsend/44arp.c
==============================================================================
--- head/contrib/ipfilter/ipsend/44arp.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/contrib/ipfilter/ipsend/44arp.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -88,7 +88,12 @@ char	*addr, *eaddr;
 	mib[2] = 0;
 	mib[3] = AF_INET;
 	mib[4] = NET_RT_FLAGS;
+#ifdef RTF_LLINFO
 	mib[5] = RTF_LLINFO;
+#else
+	mib[5] = 0;
+#endif	
+
 	if (sysctl(mib, 6, NULL, &needed, NULL, 0) == -1)
 	    {
 		perror("route-sysctl-estimate");

Modified: head/lib/libstand/if_ether.h
==============================================================================
--- head/lib/libstand/if_ether.h	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/lib/libstand/if_ether.h	Mon Dec 15 06:10:57 2008	(r186119)
@@ -156,7 +156,7 @@ struct	ifqueue arpintrq;
 void	arpwhohas(struct arpcom *, struct in_addr *);
 void	arpintr(void);
 int	arpresolve(struct arpcom *,
-	    struct rtentry *, struct mbuf *, struct sockaddr *, u_char *);
+	    struct rtentry *, struct mbuf *, struct sockaddr *, u_char *, struct llentry **);
 void	arp_ifinit(struct arpcom *, struct ifaddr *);
 void	arp_rtrequest(int, struct rtentry *, struct sockaddr *);
 
@@ -233,7 +233,7 @@ struct ether_multistep {
 #ifdef _KERNEL
 void arp_rtrequest(int, struct rtentry *, struct sockaddr *);
 int arpresolve(struct arpcom *, struct rtentry *, struct mbuf *,
-		    struct sockaddr *, u_char *);
+		    struct sockaddr *, u_char *, struct llentry **);
 void arpintr(void);
 int arpioctl(u_long, caddr_t);
 void arp_ifinit(struct arpcom *, struct ifaddr *);

Modified: head/libexec/bootpd/rtmsg.c
==============================================================================
--- head/libexec/bootpd/rtmsg.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/libexec/bootpd/rtmsg.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -152,7 +152,6 @@ tryagain:
 	sdl = (struct sockaddr_dl *)(sin->sin_len + (char *)sin);
 	if (sin->sin_addr.s_addr == sin_m.sin_addr.s_addr) {
 		if (sdl->sdl_family == AF_LINK &&
-		    (rtm->rtm_flags & RTF_LLINFO) &&
 		    !(rtm->rtm_flags & RTF_GATEWAY)) switch (sdl->sdl_type) {
 		case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023:
 		case IFT_ISO88024: case IFT_ISO88025:

Modified: head/release/picobsd/tinyware/ns/ns.c
==============================================================================
--- head/release/picobsd/tinyware/ns/ns.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/release/picobsd/tinyware/ns/ns.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -382,10 +382,6 @@ print_routing(char *proto)
 		rtm = (struct rt_msghdr *)next;
 		sa = (struct sockaddr *)(rtm + 1);
 		get_rtaddrs(rtm->rtm_addrs, sa, rti_info);
-		if (rtm->rtm_flags & RTF_WASCLONED) {
-			if ((rtm->rtm_flags & RTF_LLINFO) == 0)
-				continue;
-		}
 		if ((sa = rti_info[RTAX_DST]) != NULL) {
 			sprintf(fbuf, "%s", sock_ntop(sa, sa->sa_len));
 			if (((sa1 = rti_info[RTAX_NETMASK]) != NULL)

Modified: head/sbin/route/route.c
==============================================================================
--- head/sbin/route/route.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sbin/route/route.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -605,9 +605,6 @@ newroute(argc, argv)
 			case K_NOSTATIC:
 				flags &= ~RTF_STATIC;
 				break;
-			case K_LLINFO:
-				flags |= RTF_LLINFO;
-				break;
 			case K_LOCK:
 				locking = 1;
 				break;
@@ -632,9 +629,6 @@ newroute(argc, argv)
 			case K_PROXY:
 				proxy = 1;
 				break;
-			case K_CLONING:
-				flags |= RTF_CLONING;
-				break;
 			case K_XRESOLVE:
 				flags |= RTF_XRESOLVE;
 				break;

Modified: head/sbin/routed/table.c
==============================================================================
--- head/sbin/routed/table.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sbin/routed/table.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -1103,12 +1103,13 @@ flush_kern(void)
 		    || INFO_DST(&info)->sa_family != AF_INET)
 			continue;
 
+#if defined (RTF_LLINFO)		
 		/* ignore ARP table entries on systems with a merged route
 		 * and ARP table.
 		 */
 		if (rtm->rtm_flags & RTF_LLINFO)
 			continue;
-
+#endif
 #if defined(RTF_WASCLONED) && defined(__FreeBSD__)
 		/* ignore cloned routes
 		 */
@@ -1261,11 +1262,13 @@ read_rt(void)
 			continue;
 		}
 
+#if defined(RTF_LLINFO) 
 		if (m.r.rtm.rtm_flags & RTF_LLINFO) {
 			trace_act("ignore ARP %s", str);
 			continue;
 		}
-
+#endif
+		
 #if defined(RTF_WASCLONED) && defined(__FreeBSD__)
 		if (m.r.rtm.rtm_flags & RTF_WASCLONED) {
 			trace_act("ignore cloned %s", str);

Modified: head/share/man/man4/route.4
==============================================================================
--- head/share/man/man4/route.4	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/share/man/man4/route.4	Mon Dec 15 06:10:57 2008	(r186119)
@@ -196,7 +196,7 @@ Messages include:
 #define	RTM_REDIRECT	0x6    /* Told to use different route */
 #define	RTM_MISS	0x7    /* Lookup failed on this address */
 #define	RTM_LOCK	0x8    /* fix specified metrics */
-#define	RTM_RESOLVE	0xb    /* request to resolve dst to LL addr */
+#define	RTM_RESOLVE	0xb    /* request to resolve dst to LL addr - unused */
 #define	RTM_NEWADDR	0xc    /* address being added to iface */
 #define	RTM_DELADDR	0xd    /* address being removed from iface */
 #define	RTM_IFINFO	0xe    /* iface going up/down etc. */
@@ -308,7 +308,7 @@ Specifiers for which addresses are prese
 #define RTA_DST       0x1    /* destination sockaddr present */
 #define RTA_GATEWAY   0x2    /* gateway sockaddr present */
 #define RTA_NETMASK   0x4    /* netmask sockaddr present */
-#define RTA_GENMASK   0x8    /* cloning mask sockaddr present */
+#define RTA_GENMASK   0x8    /* cloning mask sockaddr present - unused */
 #define RTA_IFP       0x10   /* interface name sockaddr present */
 #define RTA_IFA       0x20   /* interface addr sockaddr present */
 #define RTA_AUTHOR    0x40   /* sockaddr for author of redirect */

Modified: head/share/man/man9/rtalloc.9
==============================================================================
--- head/share/man/man9/rtalloc.9	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/share/man/man9/rtalloc.9	Mon Dec 15 06:10:57 2008	(r186119)
@@ -27,7 +27,8 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd October 11, 2004
+.\"
+.Dd December 11, 2008
 .Os
 .Dt RTALLOC 9
 .Sh NAME
@@ -64,21 +65,6 @@ certain protocol\- and interface-specifi
 .\" XXX - -mdoc should contain a standard request for getting em and
 .\" en dashes.
 .Pp
-When a route with the flag
-.Dv RTF_CLONING
-is retrieved, and the action of this flag is not masked, the
-.Nm
-facility automatically generates a new route using information in the
-old route as a template, and
-sends an
-.Dv RTM_RESOLVE
-message to the appropriate interface-address route-management routine
-.Pq Fn ifa->ifa_rtrequest .
-This generated route is called
-.Em cloned ,
-and has
-.Dv RTF_WASCLONED
-flag set.
 .Dv RTF_PRCLONING
 flag is obsolete and thus ignored by facility.
 If the
@@ -123,22 +109,19 @@ field.
 .Pp
 The
 .Fn rtalloc_ign
-interface can be used when the default actions of
-.Fn rtalloc
-in the presence of the
-.Dv RTF_CLONING
-flag is undesired.
+interface can be used when the caller does not want to receive
+the returned
+.Fa rtentry
+locked.
 The
 .Fa ro
 argument is the same as
 .Fn rtalloc ,
 but there is additionally a
 .Fa flags
-argument, which lists the flags in the route which are to be
-.Em ignored
-(in most cases this is
-.Dv RTF_CLONING
-flag).
+argument, which is now only used to pass
+.Dv RTF_RNH_LOCKED
+indicating that the radix tree lock is already held.
 Both
 .Fn rtalloc
 and
@@ -163,16 +146,7 @@ directly as the
 argument.
 The second argument,
 .Fa report ,
-controls whether
-.Dv RTM_RESOLVE
-requests are sent to the lower layers when an
-.Dv RTF_CLONING
-or
-.Dv RTF_PRCLONING
-route is cloned.
-Ordinarily a value of one should be passed, except
-in the processing of those lower layers which use the cloning
-facility.
+controls whether the lower layers are notified when a lookup fails.
 The third argument,
 .Fa flags ,
 is a set of flags to ignore, as in

Modified: head/share/man/man9/rtentry.9
==============================================================================
--- head/share/man/man9/rtentry.9	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/share/man/man9/rtentry.9	Mon Dec 15 06:10:57 2008	(r186119)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 7, 2004
+.Dd December 11, 2008
 .Os
 .Dt RTENTRY 9
 .Sh NAME
@@ -76,8 +76,11 @@ right (some protocols will put a link-la
 intermediate stop on the way to that destination (if the
 .Dv RTF_GATEWAY
 flag is set).
-.It Vt "u_long rt_flags" ;
+.It Vt "int rt_flags" ;
 See below.
+.It Vt "int rt_refcnt" ;
+Route entries are reference-counted; this field indicates the number
+of external (to the radix tree) references.
 .It Vt "struct ifnet *rt_ifp" ;
 .It Vt "struct ifaddr *rt_ifa" ;
 These two fields represent the
@@ -88,48 +91,17 @@ packet to the destination or set of dest
 represents.
 .It Vt "struct rt_metrics_lite rt_rmx" ;
 See below.
-.It Vt "long rt_refcnt" ;
-Route entries are reference-counted; this field indicates the number
-of external (to the radix tree) references.
-If the
 .Dv RTF_UP
 flag is not present, the
 .Fn rtfree
 function will delete the route from the radix tree when the last
 reference drops.
-.It Vt "struct sockaddr *rt_genmask" ;
-When the
-.Fn rtalloc
-family of functions performs a cloning operation as requested by the
-.Dv RTF_CLONING
-flag, this field is used as the mask for the new route which is
-inserted into the table.
-If this field is a null pointer, then a host
-route is generated.
-.It Vt "caddr_t rt_llinfo" ;
-When the
-.Dv RTF_LLINFO
-flag is set, this field contains information specific to the link
-layer represented by the named interface address.
-(It is normally managed by the
-.Va rt_ifa->ifa_rtrequest
-routine.)
-Protocols such as
-.Xr arp 4
-use this field to reference per-destination state internal to that
-protocol.
 .It Vt "struct rtentry *rt_gwroute" ;
 This member is a reference to a route whose destination is
 .Va rt_gateway .
 It is only used for
 .Dv RTF_GATEWAY
 routes.
-.It Vt "struct rtentry *rt_parent" ;
-A reference to the route from which this route was cloned, or a null
-pointer if this route was not generated by cloning.
-See also the
-.Dv RTF_WASCLONED
-flag.
 .It Vt "struct mtx rt_mtx" ;
 Mutex to lock this routing entry.
 .El
@@ -162,23 +134,12 @@ This route was modified by
 Used only in the
 .Xr route 4
 protocol, indicating that the request was executed.
-.It Dv RTF_CLONING
-When this route is returned as a result of a lookup, automatically
-create a new route using this one as a template and
-.Va rt_genmask
-(if present) as a mask.
 .It Dv RTF_XRESOLVE
 When this route is returned as a result of a lookup, send a report on
 the
 .Xr route 4
 interface requesting that an external process perform resolution for
 this route.
-(Used in conjunction with
-.Dv RTF_CLONING . )
-.It Dv RTF_LLINFO
-Indicates that this route represents information being managed by a
-link layer's adaptation layer (e.g.,
-.Tn ARP ) .
 .It Dv RTF_STATIC
 Indicates that this route was manually added by means of the
 .Xr route 8
@@ -191,14 +152,6 @@ Requests that output sent via this route
 Protocol-specific.
 .It Dv RTF_PRCLONING
 This flag is obsolete and simply ignored by facility.
-.It Dv RTF_WASCLONED
-Indicates that this route was generated as a result of cloning
-requested by the
-.Dv RTF_CLONING
-flag.
-When set, the
-.Va rt_parent
-field indicates the route from which this one was generated.
 .It Dv RTF_PINNED
 (Reserved for future use to indicate routes which are not to be
 modified by a routing protocol.)
@@ -296,8 +249,3 @@ The
 and
 .Va rmx_filler
 fields could be named better.
-.Pp
-There is some disagreement over whether it is legitimate for
-.Dv RTF_LLINFO
-to be set by any process other than
-.Va rt_ifa->ifa_rtrequest .

Modified: head/sys/conf/NOTES
==============================================================================
--- head/sys/conf/NOTES	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/conf/NOTES	Mon Dec 15 06:10:57 2008	(r186119)
@@ -1958,7 +1958,7 @@ device		fatm			#Fore PCA200E
 device		hatm			#Fore/Marconi HE155/622
 device		patm			#IDT77252 cards (ProATM and IDT)
 device		utopia			#ATM PHY driver
-options 	NATM			#native ATM
+#options 	NATM			#native ATM
 
 options 	LIBMBPOOL		#needed by patm, iatm
 

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/conf/files	Mon Dec 15 06:10:57 2008	(r186119)
@@ -2172,6 +2172,7 @@ net/if_gre.c			optional gre
 net/if_iso88025subr.c		optional token
 net/if_lagg.c			optional lagg
 net/if_loop.c			optional loop
+net/if_llatbl.c			standard
 net/if_media.c			standard
 net/if_mib.c			standard
 net/if_ppp.c			optional ppp

Modified: head/sys/contrib/pf/net/pf.c
==============================================================================
--- head/sys/contrib/pf/net/pf.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/contrib/pf/net/pf.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -3162,7 +3162,7 @@ pf_calc_mss(struct pf_addr *addr, sa_fam
 #ifdef RTF_PRCLONING
 		rtalloc_ign(&ro, (RTF_CLONING | RTF_PRCLONING));
 #else /* !RTF_PRCLONING */
-		in_rtalloc_ign(&ro, RTF_CLONING, 0);
+		in_rtalloc_ign(&ro, 0, 0);
 #endif
 #else /* ! __FreeBSD__ */
 		rtalloc_noclone(&ro, NO_CLONING);
@@ -3183,7 +3183,7 @@ pf_calc_mss(struct pf_addr *addr, sa_fam
 		rtalloc_ign((struct route *)&ro6,
 		    (RTF_CLONING | RTF_PRCLONING));
 #else /* !RTF_PRCLONING */
-		rtalloc_ign((struct route *)&ro6, RTF_CLONING);
+		rtalloc_ign((struct route *)&ro6, 0);
 #endif
 #else /* ! __FreeBSD__ */
 		rtalloc_noclone((struct route *)&ro6, NO_CLONING);
@@ -5986,9 +5986,9 @@ pf_routable(struct pf_addr *addr, sa_fam
 #ifdef __FreeBSD__
 /* XXX MRT not always INET */ /* stick with table 0 though */
 	if (af == AF_INET)
-		in_rtalloc_ign((struct route *)&ro, RTF_CLONING, 0);
+		in_rtalloc_ign((struct route *)&ro, 0, 0);
 	else
-		rtalloc_ign((struct route *)&ro, RTF_CLONING);
+		rtalloc_ign((struct route *)&ro, 0);
 #else /* ! __FreeBSD__ */
 	rtalloc_noclone((struct route *)&ro, NO_CLONING);
 #endif
@@ -6068,9 +6068,9 @@ pf_rtlabel_match(struct pf_addr *addr, s
 	rtalloc_ign((struct route *)&ro, (RTF_CLONING|RTF_PRCLONING));
 # else /* !RTF_PRCLONING */
 	if (af == AF_INET)
-		in_rtalloc_ign((struct route *)&ro, RTF_CLONING, 0);
+		in_rtalloc_ign((struct route *)&ro, 0, 0);
 	else
-		rtalloc_ign((struct route *)&ro, RTF_CLONING);
+		rtalloc_ign((struct route *)&ro, 0);
 # endif
 #else /* ! __FreeBSD__ */
 	rtalloc_noclone((struct route *)&ro, NO_CLONING);

Modified: head/sys/contrib/rdma/rdma_addr.c
==============================================================================
--- head/sys/contrib/rdma/rdma_addr.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/contrib/rdma/rdma_addr.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -163,6 +163,7 @@ static void addr_send_arp(struct sockadd
 	struct route iproute;
 	struct sockaddr_in *dst = (struct sockaddr_in *)&iproute.ro_dst;
 	char dmac[ETHER_ADDR_LEN];
+	struct llentry *lle;
 
 	bzero(&iproute, sizeof iproute);
 	*dst = *dst_in;
@@ -172,7 +173,7 @@ static void addr_send_arp(struct sockadd
 		return;
 
 	arpresolve(iproute.ro_rt->rt_ifp, iproute.ro_rt, NULL, 
-		   rt_key(iproute.ro_rt), dmac);
+		   rt_key(iproute.ro_rt), dmac, &lle);
 
 	RTFREE(iproute.ro_rt);
 }
@@ -186,6 +187,7 @@ static int addr_resolve_remote(struct so
 	struct route iproute;
 	struct sockaddr_in *dst = (struct sockaddr_in *)&iproute.ro_dst;
 	char dmac[ETHER_ADDR_LEN];
+	struct llentry *lle;
 
 	bzero(&iproute, sizeof iproute);
 	*dst = *dst_in;
@@ -202,7 +204,7 @@ static int addr_resolve_remote(struct so
 		goto put;
 	}
  	ret = arpresolve(iproute.ro_rt->rt_ifp, iproute.ro_rt, NULL, 
-		rt_key(iproute.ro_rt), dmac);
+		rt_key(iproute.ro_rt), dmac, &lle);
 	if (ret) {
 		goto put;
 	}

Modified: head/sys/dev/cxgb/ulp/tom/cxgb_l2t.c
==============================================================================
--- head/sys/dev/cxgb/ulp/tom/cxgb_l2t.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/dev/cxgb/ulp/tom/cxgb_l2t.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -93,15 +93,15 @@ arp_hash(u32 key, int ifindex, const str
 }
 
 static inline void
-neigh_replace(struct l2t_entry *e, struct rtentry *rt)
+neigh_replace(struct l2t_entry *e, struct llentry *neigh)
 {
-	RT_LOCK(rt);
-	RT_ADDREF(rt);
-	RT_UNLOCK(rt);
+	LLE_WLOCK(neigh);
+	LLE_ADDREF(neigh);
+	LLE_WUNLOCK(neigh);
 	
 	if (e->neigh)
-		RTFREE(e->neigh);
-	e->neigh = rt;
+		LLE_FREE(e->neigh);
+	e->neigh = neigh;
 }
 
 /*
@@ -164,7 +164,7 @@ arpq_enqueue(struct l2t_entry *e, struct
 int
 t3_l2t_send_slow(struct t3cdev *dev, struct mbuf *m, struct l2t_entry *e)
 {
-	struct rtentry *rt =  e->neigh;
+	struct llentry *lle =  e->neigh;
 	struct sockaddr_in sin;
 
 	bzero(&sin, sizeof(struct sockaddr_in));
@@ -177,7 +177,7 @@ again:
 	switch (e->state) {
 	case L2T_STATE_STALE:     /* entry is stale, kick off revalidation */
 		arpresolve(rt->rt_ifp, rt, NULL,
-		     (struct sockaddr *)&sin, e->dmac);
+		     (struct sockaddr *)&sin, e->dmac, &lle);
 		mtx_lock(&e->lock);
 		if (e->state == L2T_STATE_STALE)
 			e->state = L2T_STATE_VALID;
@@ -201,7 +201,7 @@ again:
 		 * entries when there's no memory.
 		 */
 		if (arpresolve(rt->rt_ifp, rt, NULL,
-		     (struct sockaddr *)&sin, e->dmac) == 0) {
+		     (struct sockaddr *)&sin, e->dmac, &lle) == 0) {
 			CTR6(KTR_CXGB, "mac=%x:%x:%x:%x:%x:%x\n",
 			    e->dmac[0], e->dmac[1], e->dmac[2], e->dmac[3], e->dmac[4], e->dmac[5]);
 			
@@ -222,12 +222,12 @@ again:
 void
 t3_l2t_send_event(struct t3cdev *dev, struct l2t_entry *e)
 {
-	struct rtentry *rt;
 	struct mbuf *m0;
 	struct sockaddr_in sin;
 	sin.sin_family = AF_INET;
 	sin.sin_len = sizeof(struct sockaddr_in);
 	sin.sin_addr.s_addr = e->addr;
+	struct llentry *lle;
 	
 	if ((m0 = m_gethdr(M_NOWAIT, MT_DATA)) == NULL)
 		return;
@@ -237,7 +237,7 @@ again:
 	switch (e->state) {
 	case L2T_STATE_STALE:     /* entry is stale, kick off revalidation */
 		arpresolve(rt->rt_ifp, rt, NULL,
-		     (struct sockaddr *)&sin, e->dmac);
+		     (struct sockaddr *)&sin, e->dmac, &lle);
 		mtx_lock(&e->lock);
 		if (e->state == L2T_STATE_STALE) {
 			e->state = L2T_STATE_VALID;
@@ -263,7 +263,7 @@ again:
 		 * entries when there's no memory.
 		 */
 		arpresolve(rt->rt_ifp, rt, NULL,
-		    (struct sockaddr *)&sin, e->dmac);
+		    (struct sockaddr *)&sin, e->dmac, &lle);
 
 	}
 	return;
@@ -321,18 +321,18 @@ found:
 void
 t3_l2e_free(struct l2t_data *d, struct l2t_entry *e)
 {
-	struct rtentry *rt = NULL;
-	
+	struct llentry *lle;
+
 	mtx_lock(&e->lock);
 	if (atomic_load_acq_int(&e->refcnt) == 0) {  /* hasn't been recycled */
-		rt = e->neigh;
+		lle = e->neigh;
 		e->neigh = NULL;
 	}
 	
 	mtx_unlock(&e->lock);
 	atomic_add_int(&d->nfree, 1);
-	if (rt)
-		RTFREE(rt);
+	if (lle)
+		LLE_FREE(lle);
 }
 
 
@@ -341,11 +341,8 @@ t3_l2e_free(struct l2t_data *d, struct l
  * Must be called with softirqs disabled.
  */
 static inline void
-reuse_entry(struct l2t_entry *e, struct rtentry *neigh)
+reuse_entry(struct l2t_entry *e, struct llentry *neigh)
 {
-	struct llinfo_arp *la;
-
-	la = (struct llinfo_arp *)neigh->rt_llinfo; 
 
 	mtx_lock(&e->lock);                /* avoid race with t3_l2t_free */
 	if (neigh != e->neigh)
@@ -362,13 +359,13 @@ reuse_entry(struct l2t_entry *e, struct 
 }
 
 struct l2t_entry *
-t3_l2t_get(struct t3cdev *dev, struct rtentry *neigh, struct ifnet *ifp,
+t3_l2t_get(struct t3cdev *dev, struct llentry *neigh, struct ifnet *ifp,
 	struct sockaddr *sa)
 {
 	struct l2t_entry *e;
 	struct l2t_data *d = L2DATA(dev);
 	u32 addr = ((struct sockaddr_in *)sa)->sin_addr.s_addr;
-	int ifidx = neigh->rt_ifp->if_index;
+	int ifidx = ifp->if_index;
 	int hash = arp_hash(addr, ifidx, d);
 	unsigned int smt_idx = ((struct port_info *)ifp->if_softc)->port_id;
 
@@ -448,20 +445,19 @@ handle_failed_resolution(struct t3cdev *
 }
 
 void
-t3_l2t_update(struct t3cdev *dev, struct rtentry *neigh,
+t3_l2t_update(struct t3cdev *dev, struct llentry *neigh,
     uint8_t *enaddr, struct sockaddr *sa)
 {
 	struct l2t_entry *e;
 	struct mbuf *arpq = NULL;
 	struct l2t_data *d = L2DATA(dev);
 	u32 addr = *(u32 *) &((struct sockaddr_in *)sa)->sin_addr;
-	int ifidx = neigh->rt_ifp->if_index;
 	int hash = arp_hash(addr, ifidx, d);
 	struct llinfo_arp *la;
 
 	rw_rlock(&d->lock);
 	for (e = d->l2tab[hash].first; e; e = e->next)
-		if (e->addr == addr && e->ifindex == ifidx) {
+		if (e->addr == addr) {
 			mtx_lock(&e->lock);
 			goto found;
 		}

Modified: head/sys/dev/cxgb/ulp/tom/cxgb_l2t.h
==============================================================================
--- head/sys/dev/cxgb/ulp/tom/cxgb_l2t.h	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/dev/cxgb/ulp/tom/cxgb_l2t.h	Mon Dec 15 06:10:57 2008	(r186119)
@@ -68,7 +68,7 @@ struct l2t_entry {
 	int ifindex;                  /* neighbor's net_device's ifindex */
 	uint16_t smt_idx;             /* SMT index */
 	uint16_t vlan;                /* VLAN TCI (id: bits 0-11, prio: 13-15 */
-	struct rtentry *neigh;        /* associated neighbour */
+	struct llentry *neigh;        /* associated neighbour */
 	struct l2t_entry *first;      /* start of hash chain */
 	struct l2t_entry *next;       /* next l2t_entry on chain */
 	struct mbuf *arpq_head;       /* queue of packets awaiting resolution */

Modified: head/sys/modules/cxgb/Makefile
==============================================================================
--- head/sys/modules/cxgb/Makefile	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/modules/cxgb/Makefile	Mon Dec 15 06:10:57 2008	(r186119)
@@ -25,7 +25,7 @@ _toe_header = ${_sysdir}/netinet/toedev.
 
 .if exists(${_toe_header})
 _toecore = toecore
-_tom = tom
+#_tom = tom
 .endif
 
 .if ${MACHINE_ARCH} == "i386" && exists(${_toe_header})

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/net/if.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -60,6 +60,7 @@
 #include <sys/jail.h>
 #include <sys/vimage.h>
 #include <machine/stdarg.h>
+#include <vm/uma.h>
 
 #include <net/if.h>
 #include <net/if_arp.h>
@@ -1366,6 +1367,9 @@ done:
 	return (ifa);
 }
 
+#include <net/route.h>
+#include <net/if_llatbl.h>
+
 /*
  * Default action when installing a route with a Link Level gateway.
  * Lookup an appropriate real ifa to point to.

Modified: head/sys/net/if_arcsubr.c
==============================================================================
--- head/sys/net/if_arcsubr.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/net/if_arcsubr.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -64,6 +64,7 @@
 #include <net/if_arc.h>
 #include <net/if_arp.h>
 #include <net/bpf.h>
+#include <net/if_llatbl.h>
 
 #if defined(INET) || defined(INET6)
 #include <netinet/in.h>
@@ -108,6 +109,7 @@ arc_output(struct ifnet *ifp, struct mbu
 	u_int8_t		atype, adst;
 	int			loop_copy = 0;
 	int			isphds;
+	struct llentry		*lle;
 
 	if (!((ifp->if_flags & IFF_UP) &&
 	    (ifp->if_drv_flags & IFF_DRV_RUNNING)))
@@ -127,7 +129,7 @@ arc_output(struct ifnet *ifp, struct mbu
 		else if (ifp->if_flags & IFF_NOARP)
 			adst = ntohl(SIN(dst)->sin_addr.s_addr) & 0xFF;
 		else {
-			error = arpresolve(ifp, rt0, m, dst, &adst);
+			error = arpresolve(ifp, rt0, m, dst, &adst, &lle);
 			if (error)
 				return (error == EWOULDBLOCK ? 0 : error);
 		}
@@ -165,7 +167,7 @@ arc_output(struct ifnet *ifp, struct mbu
 #endif
 #ifdef INET6
 	case AF_INET6:
-		error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)&adst);
+		error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)&adst, &lle);
 		if (error)
 			return (error);
 		atype = ARCTYPE_INET6;

Modified: head/sys/net/if_atmsubr.c
==============================================================================
--- head/sys/net/if_atmsubr.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/net/if_atmsubr.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -153,22 +153,11 @@ atm_output(struct ifnet *ifp, struct mbu
 		case AF_INET:
 		case AF_INET6:
 		{
-			struct rtentry *rt = NULL;
-			/*  
-			 * check route
-			 */
-			if (rt0 != NULL) {
-				error = rt_check(&rt, &rt0, dst);
-				if (error)
-					goto bad;
-				RT_UNLOCK(rt);
-			}
-
 			if (dst->sa_family == AF_INET6)
 			        etype = ETHERTYPE_IPV6;
 			else
 			        etype = ETHERTYPE_IP;
-			if (!atmresolve(rt, m, dst, &atmdst)) {
+			if (!atmresolve(rt0, m, dst, &atmdst)) {
 				m = NULL; 
 				/* XXX: atmresolve already free'd it */
 				senderr(EHOSTUNREACH);

Modified: head/sys/net/if_ethersubr.c
==============================================================================
--- head/sys/net/if_ethersubr.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/net/if_ethersubr.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -64,6 +64,7 @@
 #include <net/ethernet.h>
 #include <net/if_bridgevar.h>
 #include <net/if_vlan_var.h>
+#include <net/if_llatbl.h>
 #include <net/pf_mtag.h>
 #include <net/vnet.h>
 
@@ -87,6 +88,7 @@
 #include <netipx/ipx.h>
 #include <netipx/ipx_if.h>
 #endif
+
 int (*ef_inputp)(struct ifnet*, struct ether_header *eh, struct mbuf *m);
 int (*ef_outputp)(struct ifnet *ifp, struct mbuf **mp,
 		struct sockaddr *dst, short *tp, int *hlen);
@@ -151,6 +153,7 @@ static int ether_ipfw;
 #endif
 #endif
 
+
 /*
  * Ethernet output routine.
  * Encapsulate a packet of type family for the local net.
@@ -164,6 +167,7 @@ ether_output(struct ifnet *ifp, struct m
 	short type;
 	int error, hdrcmplt = 0;
 	u_char esrc[ETHER_ADDR_LEN], edst[ETHER_ADDR_LEN];
+	struct llentry *lle = NULL;
 	struct ether_header *eh;
 	struct pf_mtag *t;
 	int loop_copy = 1;
@@ -186,7 +190,7 @@ ether_output(struct ifnet *ifp, struct m
 	switch (dst->sa_family) {
 #ifdef INET
 	case AF_INET:
-		error = arpresolve(ifp, rt0, m, dst, edst);
+		error = arpresolve(ifp, rt0, m, dst, edst, &lle);
 		if (error)
 			return (error == EWOULDBLOCK ? 0 : error);
 		type = htons(ETHERTYPE_IP);
@@ -221,7 +225,7 @@ ether_output(struct ifnet *ifp, struct m
 #endif
 #ifdef INET6
 	case AF_INET6:
-		error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst);
+		error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst, &lle);
 		if (error)
 			return error;
 		type = htons(ETHERTYPE_IPV6);
@@ -289,6 +293,17 @@ ether_output(struct ifnet *ifp, struct m
 		senderr(EAFNOSUPPORT);
 	}
 
+	if (lle != NULL && (lle->la_flags & LLE_IFADDR)) {
+		int csum_flags = 0;
+		if (m->m_pkthdr.csum_flags & CSUM_IP)
+			csum_flags |= (CSUM_IP_CHECKED|CSUM_IP_VALID);
+		if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA)
+			csum_flags |= (CSUM_DATA_VALID|CSUM_PSEUDO_HDR);
+		m->m_pkthdr.csum_flags |= csum_flags;
+		m->m_pkthdr.csum_data = 0xffff;
+		return (if_simloop(ifp, m, dst->sa_family, 0));
+	}
+
 	/*
 	 * Add local net header.  If no space in first mbuf,
 	 * allocate another.

Modified: head/sys/net/if_fddisubr.c
==============================================================================
--- head/sys/net/if_fddisubr.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/net/if_fddisubr.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -55,6 +55,7 @@
 #include <net/if_dl.h>
 #include <net/if_llc.h>
 #include <net/if_types.h>
+#include <net/if_llatbl.h>
 
 #include <net/ethernet.h>
 #include <net/netisr.h>
@@ -120,6 +121,7 @@ fddi_output(ifp, m, dst, rt0)
 	int loop_copy = 0, error = 0, hdrcmplt = 0;
  	u_char esrc[FDDI_ADDR_LEN], edst[FDDI_ADDR_LEN];
 	struct fddi_header *fh;
+	struct llentry *lle;
 
 #ifdef MAC
 	error = mac_ifnet_check_transmit(ifp, m);
@@ -137,7 +139,7 @@ fddi_output(ifp, m, dst, rt0)
 	switch (dst->sa_family) {
 #ifdef INET
 	case AF_INET: {
-		error = arpresolve(ifp, rt0, m, dst, edst);
+		error = arpresolve(ifp, rt0, m, dst, edst, &lle);
 		if (error)
 			return (error == EWOULDBLOCK ? 0 : error);
 		type = htons(ETHERTYPE_IP);
@@ -173,7 +175,7 @@ fddi_output(ifp, m, dst, rt0)
 #endif /* INET */
 #ifdef INET6
 	case AF_INET6:
-		error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst);
+		error = nd6_storelladdr(ifp, rt0, m, dst, (u_char *)edst, &lle);
 		if (error)
 			return (error); /* Something bad happened */
 		type = htons(ETHERTYPE_IPV6);

Modified: head/sys/net/if_fwsubr.c
==============================================================================
--- head/sys/net/if_fwsubr.c	Mon Dec 15 06:00:25 2008	(r186118)
+++ head/sys/net/if_fwsubr.c	Mon Dec 15 06:10:57 2008	(r186119)
@@ -51,6 +51,7 @@
 #include <net/if_types.h>
 #include <net/bpf.h>
 #include <net/firewire.h>
+#include <net/if_llatbl.h>
 
 #if defined(INET) || defined(INET6)
 #include <netinet/in.h>
@@ -80,7 +81,6 @@ firewire_output(struct ifnet *ifp, struc
 {
 	struct fw_com *fc = IFP2FWC(ifp);
 	int error, type;
-	struct rtentry *rt = NULL;
 	struct m_tag *mtag;
 	union fw_encap *enc;
 	struct fw_hwaddr *destfw;
@@ -89,6 +89,7 @@ firewire_output(struct ifnet *ifp, struc
 	struct mbuf *mtail;
 	int unicast, dgl, foff;
 	static int next_dgl;
+	struct llentry *lle;
 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



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