Subject: Bug in /usr/src/sys/netinet/in.c
To: None <netbsd-bugs@netbsd.org>
From: Karl Fox <karl@MorningStar.Com>
List: netbsd-bugs
Date: 11/03/1994 09:49:09
We were having trouble with bogus routes being added when using a
netmask of 255.0.0.0, which we tracked down to a problem in
/usr/src/sys/netinet/in.c. Here's the version information, followed
by the diff:
/* $NetBSD: in.c,v 1.14 1994/06/29 06:38:00 cgd Exp $ */
...
* @(#)in.c 8.2 (Berkeley) 11/15/93
*** in.c.orig Thu Nov 3 09:42:57 1994
--- in.c Thu Nov 3 09:43:45 1994
***************
*** 147,153 ****
register char *cp = (char *) (&ap->sin_addr + 1);
ap->sin_len = 0;
! while (--cp > cplim)
if (*cp) {
(ap)->sin_len = cp - (char *) (ap) + 1;
break;
--- 147,153 ----
register char *cp = (char *) (&ap->sin_addr + 1);
ap->sin_len = 0;
! while (--cp >= cplim)
if (*cp) {
(ap)->sin_len = cp - (char *) (ap) + 1;
break;