[470] in linux-net channel archive

home help back first fref pref prev next nref lref last post

CONFIG_INET_SNARL: What for?

daemon@ATHENA.MIT.EDU (Matthias Urlichs)
Tue Jun 13 07:31:08 1995

To: submit-linux-dev-net@ratatosk.yggdrasil.com
From: urlichs@smurf.noris.de (Matthias Urlichs)
Date: 13 Jun 1995 11:35:09 +0200

Hi,

CONFIG_INET_SNARL selects whether to use the netmask of a device (set by
ifconfig) or the IP-class-default netmask (i.e. 255.255.255.0 for a class C
address) for figuring out which MTU to use for TCP.

I wonder what the reason for this is. I can't think of any correctly-
configured machine where the latter behavior would make any more sense than
the former, yet the latter is the default (and more expensive to compute).
On the other hand, for networks with non-default netmasks, I can think of a
few cases where the former behavior would make much more sense.

Thus, I vote to get rid of CONFIG_INET_SNARL. Let the following patch apply:

--- ../linux-1.3/arch/i386/config.in	Mon Jun 12 18:52:46 1995
+++ arch/i386/config.in	Tue Jun 13 11:21:38 1995
@@ -54,7 +54,6 @@
 comment '(it is safe to leave these untouched)'
 bool 'IP: PC/TCP compatibility mode' CONFIG_INET_PCTCP n
 bool 'IP: Reverse ARP' CONFIG_INET_RARP n
-bool 'IP: Assume subnets are local' CONFIG_INET_SNARL y
 bool 'IP: Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF n
 bool 'IP: Drop source routed frames' CONFIG_IP_NOSR y
 fi
--- ../linux-1.3/net/ipv4/tcp.c	Tue Jun  6 11:16:44 1995
+++ net/ipv4/tcp.c	Tue Jun 13 11:22:44 1995
@@ -2786,17 +2786,10 @@
 		newsk->mtu = sk->user_mss;
 	else if(rt!=NULL && (rt->rt_flags&RTF_MSS))
 		newsk->mtu = rt->rt_mss - HEADER_SIZE;
-	else 
-	{
-#ifdef CONFIG_INET_SNARL	/* Sub Nets Are Local */
-		if ((saddr ^ daddr) & default_mask(saddr))
-#else
-		if ((saddr ^ daddr) & dev->pa_mask)
-#endif
-			newsk->mtu = 576 - HEADER_SIZE;
-		else
-			newsk->mtu = MAX_WINDOW;
-	}
+	else if ((saddr ^ daddr) & dev->pa_mask)
+		newsk->mtu = 576 - HEADER_SIZE;
+	else
+		newsk->mtu = MAX_WINDOW;
 
 	/*
 	 *	But not bigger than device MTU 
@@ -4321,17 +4314,10 @@
 		sk->mtu = sk->user_mss;
 	else if(rt!=NULL && (rt->rt_flags&RTF_MTU))
 		sk->mtu = rt->rt_mss;
-	else 
-	{
-#ifdef CONFIG_INET_SNARL
-		if ((sk->saddr ^ sk->daddr) & default_mask(sk->saddr))
-#else
-		if ((sk->saddr ^ sk->daddr) & dev->pa_mask)
-#endif
-			sk->mtu = 576 - HEADER_SIZE;
-		else
-			sk->mtu = MAX_WINDOW;
-	}
+	else if ((sk->saddr ^ sk->daddr) & dev->pa_mask)
+		sk->mtu = 576 - HEADER_SIZE;
+	else
+		sk->mtu = MAX_WINDOW;
 	/*
 	 *	but not bigger than device MTU 
 	 */

-- 
What a depressingly stupid machine.
-- 
Matthias Urlichs        \ XLink-POP Nürnberg  | EMail: urlichs@smurf.noris.de
Schleiermacherstraße 12  \  Unix+Linux+Mac    | Phone: ...please use email.
90491 Nürnberg (Germany)  \   Consulting+Networking+Programming+etc'ing     42
          PGP: 1B 89 E2 1C 43 EA 80 44  15 D2 29 CF C6 C7 E0 DE 
      Click <A HREF="http://smurf.noris.de/~urlichs/finger">here</A>.

home help back first fref pref prev next nref lref last post