network - Fix missing tailq initializer for if_creategroup() API
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 2 Nov 2010 17:12:14 +0000 (10:12 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 2 Nov 2010 17:13:17 +0000 (10:13 -0700)
* The ifg_head list was missing its initializer, causing calls to
  if_creategroup() (e.g. by pf/pfsync) to panic the box.

sys/net/if.c

index 7cdead3..53dfe6c 100644 (file)
@@ -202,7 +202,7 @@ KTR_INFO(KTR_IF_START, if_start, chase_sched, 4,
 #endif
 #define logifstart(name, arg)  KTR_LOG(if_start_ ## name, arg)
 
-TAILQ_HEAD(, ifg_group) ifg_head;
+TAILQ_HEAD(, ifg_group) ifg_head = TAILQ_HEAD_INITIALIZER(ifg_head);
 
 /*
  * Network interface utility routines.