network - Add initializer for ifnet.if_groups.
authorJoe Talbott <josepht@dragonflybsd.org>
Wed, 3 Nov 2010 18:29:47 +0000 (14:29 -0400)
committerJoe Talbott <josepht@dragonflybsd.org>
Wed, 3 Nov 2010 18:34:22 +0000 (14:34 -0400)
Prevents a NULL pointer dereference when pfsync is compiled into the
kernel.

Reported-By: mat on Efnet#dragonflybsd
Tested-By: mat on Efnet#dragonflybsd
sys/net/if.c

index 53dfe6c..2e051be 100644 (file)
@@ -543,6 +543,7 @@ if_attach(struct ifnet *ifp, lwkt_serialize_t serializer)
 
        TAILQ_INIT(&ifp->if_prefixhead);
        TAILQ_INIT(&ifp->if_multiaddrs);
+       TAILQ_INIT(&ifp->if_groups);
        getmicrotime(&ifp->if_lastchange);
        if (ifindex2ifnet == NULL || if_index >= if_indexlim) {
                unsigned int n;