route cacheing for gif(4) should be optional

Gleb Smirnoff glebius at freebsd.org
Thu Nov 25 06:06:48 PST 2004


  Back to this problem:

http://freebsd.rambler.ru/bsdmail/freebsd-net_2004/msg01305.html

I've found two more people who dislike this feature of gif(4).
So I'd like to make it optional. 

We already have LINK2 flag removing sourceroute filter from gif(4),
which is commonly used in asymmetrically routed networks. I suggest
to use this flag also for disabling route cacheing, since asymmetricity
often appears in dynamically routed networks, and if one runs dynamic
routing, he probably wants to remove route cacheing, too.

Any objections?

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
-------------- next part --------------
Index: in_gif.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/in_gif.c,v
retrieving revision 1.26
diff -u -r1.26 in_gif.c
--- in_gif.c	18 Jun 2004 02:04:07 -0000	1.26
+++ in_gif.c	25 Nov 2004 17:16:14 -0000
@@ -209,6 +209,12 @@
 	}
 
 	error = ip_output(m, NULL, &sc->gif_ro, 0, NULL, NULL);
+
+	if ((sc->gif_if.if_flags & IFF_LINK2) != 0) {
+		RTFREE(sc->gif_ro.ro_rt);
+		sc->gif_ro.ro_rt = NULL;
+	}
+
 	return (error);
 }
 


More information about the freebsd-net mailing list