Subject: pr bin/2700 fix
To: None <netbsd-bugs@NetBSD.ORG>
From: Geoff Wing <mason@primenet.com.au>
List: netbsd-bugs
Date: 04/27/1997 20:55:58
In bin/2700 I reported a bug in sbin/route. OpenBSD people fixed this the
next day, but it's only taken NetBSD 8 months so far. Good stuff. Well, as
far as I can tell, sending pr's is only useful if a patch is sent with it
(which send-pr should tell you) ... Anyway, here it is.
I haven't waited 8 months for my pr 3196 yet so don't expect a patch for
that difficult one either. Grumble grumble.
*** /usr/src/sbin/route/route.c Mon Apr 21 23:45:11 1997
--- /usr/obj/sbin/route/route.c Sun Apr 27 20:46:03 1997
***************
*** 657,684 ****
flags |= RTF_STATIC;
break;
case K_IFA:
! argc--;
(void) getaddr(RTA_IFA, *++argv, 0);
break;
case K_IFP:
! argc--;
(void) getaddr(RTA_IFP, *++argv, 0);
break;
case K_GENMASK:
! argc--;
(void) getaddr(RTA_GENMASK, *++argv, 0);
break;
case K_GATEWAY:
! argc--;
(void) getaddr(RTA_GATEWAY, *++argv, 0);
break;
case K_DST:
! argc--;
ishost = getaddr(RTA_DST, *++argv, &hp);
dest = *argv;
break;
case K_NETMASK:
! argc--;
(void) getaddr(RTA_NETMASK, *++argv, 0);
/* FALLTHROUGH */
case K_NET:
--- 657,690 ----
flags |= RTF_STATIC;
break;
case K_IFA:
! if (!--argc)
! usage(1+*argv);
(void) getaddr(RTA_IFA, *++argv, 0);
break;
case K_IFP:
! if (!--argc)
! usage(1+*argv);
(void) getaddr(RTA_IFP, *++argv, 0);
break;
case K_GENMASK:
! if (!--argc)
! usage(1+*argv);
(void) getaddr(RTA_GENMASK, *++argv, 0);
break;
case K_GATEWAY:
! if (!--argc)
! usage(1+*argv);
(void) getaddr(RTA_GATEWAY, *++argv, 0);
break;
case K_DST:
! if (!--argc)
! usage(1+*argv);
ishost = getaddr(RTA_DST, *++argv, &hp);
dest = *argv;
break;
case K_NETMASK:
! if (!--argc)
! usage(1+*argv);
(void) getaddr(RTA_NETMASK, *++argv, 0);
/* FALLTHROUGH */
case K_NET:
--
Geoff Wing [mason@primenet.com.au] Technical Manager
Phone : +61-3-9818 2977 PrimeNet - Internet Consultancy
Facsimile: +61-3-9819 3788 Web : <URL:http://www.primenet.com.au/>
Mobile : 0412 162 441