Date: Fri, 8 Jan 1999 18:20:53 +0100 (CET) From: assar@sics.se To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: kern/9391: if_addmulti doesn't check for retifma == NULL Message-ID: <199901081720.SAA04655@assaris.sics.se>
index | next in thread | raw e-mail
>Number: 9391
>Category: kern
>Synopsis: if_addmulti doesn't check for retifma == NULL
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Jan 8 09:20:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Assar Westerlund
>Release: FreeBSD 3.0-CURRENT i386
>Organization:
none
>Environment:
>Description:
int
if_addmulti(ifp, sa, retifma)
struct ifnet *ifp; /* interface to manipulate */
struct sockaddr *sa; /* address to add */
struct ifmultiaddr **retifma;
and it only checks for retifma being NULL in one path of the code and
not in the other.
>How-To-Repeat:
if_addmulti(ifp, sa, NULL);
>Fix:
Index: if.c
===================================================================
RCS file: /src/fbsd-repository/src/sys/net/if.c,v
retrieving revision 1.64
diff -u -w -u -w -r1.64 if.c
--- if.c 1998/12/16 18:30:42 1.64
+++ if.c 1999/01/08 17:18:14
@@ -967,6 +967,7 @@
s = splimp();
LIST_INSERT_HEAD(&ifp->if_multiaddrs, ifma, ifma_link);
splx(s);
+ if(retifma)
*retifma = ifma;
if (llsa != 0) {
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901081720.SAA04655>
