bin/57484: routed not ignoring cloned routes

Richard Perini rpp at
Wed Oct 1 18:40:14 PDT 2003

>Number:         57484
>Category:       bin
>Synopsis:       routed not ignoring cloned routes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 01 18:40:10 PDT 2003
>Originator:     Richard Perini
>Release:        CURRENT, 4-STABLE
Corinthian Engineering P/L Sydney
System: FreeBSD 4.7-STABLE FreeBSD 4.7-STABLE #2: Sun Feb 2 11:36:09 EST 2003 rpp at i386
	Routed clobbers all cloned host routes in the kernel's routing
	table.  Symptoms are: higher than normal cpu time used by routed,
	some network functionality relying on presence of cloned host 
	routes fails, cloned routes absent from netstat -ra after starting 

	First noticed when FreeBSD host running routed failed to respond to 
	a router's ICMP "Must_fragment" packet relating to a GRE tunnel
	having a smaller MTU size than the default 1500 mtu.
	The following patch applied to FreeBSD 4-STABLE source fixes
	the problem.  Similar code exists in zebra and routed for
	recent BSDI and NetBSD found on, which appears
	to be a reference site for BSD routed(?).

--- /usr/src/sbin/routed/table.c	Tue Sep 30 13:12:32 2003
+++ /u1/users/rpp/src/routed/table.c	Thu Oct  2 10:42:09 2003
@@ -1116,6 +1116,13 @@
 		if (rtm->rtm_flags & RTF_LLINFO)
+		/* ignore cloned routes
+		*/
+#if		defined(__FreeBSD__) && defined(RTF_WASCLONED)
+		if (rtm->rtm_flags & RTF_WASCLONED)
+			continue;
 		/* ignore multicast addresses
 		if (IN_MULTICAST(ntohl(S_ADDR(INFO_DST(&info)))))
@@ -1261,6 +1268,13 @@
 			trace_act("ignore ARP %s", str);
+#if		defined(__FreeBSD__) && defined(RTF_WASCLONED)
+		if (m.r.rtm.rtm_flags & RTF_WASCLONED){
+			trace_act("ignore cloned route %s", str);
+			continue;
+		}
 		if (get_info_gate(&INFO_GATE(&info), &gate_sin)) {
 			gate = S_ADDR(INFO_GATE(&info));

More information about the freebsd-bugs mailing list