Subject: kern/19037: Memory type mismatch in ether_ifdetach()
To: None <gnats-bugs@gnats.netbsd.org>
From: None <seanb@qnx.com>
List: netbsd-bugs
Date: 11/13/2002 08:54:34
>Number:         19037
>Category:       kern
>Synopsis:       Memory type mismatch in ether_ifdetach()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 13 08:55:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Sean Boudreau
>Release:        1-5
>Organization:
QNX
>Environment:
NetBSD fili 1.5.1 NetBSD 1.5.1 (ker.xtang) #2: Mon Jul 30 09:33:07 EDT 2001     root@fili:/usr/src/sys/arch/i386/compile/ker.xtang i386
>Description:
Ethernet multicast entries are malloc'd M_IFMADDR; however,
ether_ifdetach() free's M_IFADDR.
>How-To-Repeat:

>Fix:
Index: net/if_ethersubr.c
================================================================
RCS file: /cvsroot/syssrc/sys/net/if_ethersubr.c,v
retrieving revision 1.99
diff -c -r1.99 if_ethersubr.c
*** net/if_ethersubr.c  2002/09/11 05:36:26     1.99
--- net/if_ethersubr.c  2002/11/13 16:53:51
***************
*** 1092,1098 ****
        s = splnet();
        while ((enm = LIST_FIRST(&ec->ec_multiaddrs)) != NULL) {
                LIST_REMOVE(enm, enm_list);
!               free(enm, M_IFADDR);
                ec->ec_multicnt--;
        }
        splx(s);
--- 1092,1098 ----
        s = splnet();
        while ((enm = LIST_FIRST(&ec->ec_multiaddrs)) != NULL) {
                LIST_REMOVE(enm, enm_list);
!               free(enm, M_IFMADDR);
                ec->ec_multicnt--;
        }
        splx(s);
>Release-Note:
>Audit-Trail:
>Unformatted: