From bfe778b442a97c1b19f3b4fff7fff2f4ea5869e3 Mon Sep 17 00:00:00 2001 From: tjr Date: Tue, 25 Feb 2003 15:10:23 +0000 Subject: Allocate struct ipx_ifaddrs with an initial reference count of 1, not 0. The wrong reference count was causing them to get freed too early and have their contents scrambled. --- sys/netipx/ipx.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/netipx') diff --git a/sys/netipx/ipx.c b/sys/netipx/ipx.c index 0162831..44e6ff9 100644 --- a/sys/netipx/ipx.c +++ b/sys/netipx/ipx.c @@ -142,6 +142,7 @@ ipx_control(so, cmd, data, ifp, td) ia = oia; ifa = (struct ifaddr *)ia; IFA_LOCK_INIT(ifa); + ifa->ifa_refcnt = 1; TAILQ_INSERT_TAIL(&ifp->if_addrhead, ifa, ifa_link); ia->ia_ifp = ifp; ifa->ifa_addr = (struct sockaddr *)&ia->ia_addr; -- cgit v1.1