Subject: bug in routed; adds incorrect netmasks
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Brad Parker <brad@fcr.com>
List: current-users
Date: 08/03/1994 23:10:13
I believe there is a bug in routed.  It seems to add routes with very
odd (and incorrect) netmasks.  It looks like a "cut and paste" error.

(I found this trying to get gated to work - gated dumped core on the
non-contig netmasks)

Try running "netstat -rAn" on your machine to see what I mean.

Here's the fix:

*** inet.c.orig	Wed Aug  3 23:06:27 1994
--- inet.c	Wed Aug  3 23:06:33 1994
***************
*** 144,152 ****
  	} else if (IN_CLASSA(i)) {
  		mask = IN_CLASSA_NET;
  	} else if (IN_CLASSB(i)) {
! 		mask = i & IN_CLASSB_NET;
  	} else
! 		mask = i & IN_CLASSC_NET;
  
  	/*
  	 * Check whether network is a subnet;
--- 144,152 ----
  	} else if (IN_CLASSA(i)) {
  		mask = IN_CLASSA_NET;
  	} else if (IN_CLASSB(i)) {
! 		mask = IN_CLASSB_NET;
  	} else
! 		mask = IN_CLASSC_NET;
  
  	/*
  	 * Check whether network is a subnet;

-brad

------------------------------------------------------------------------------