diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2004-11-23 23:31:33 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2004-11-23 23:31:33 +0000 |
| commit | 6237419d5c95dfc3176b2c23020f83f3e7b5ee6c (patch) | |
| tree | 08c0390b63dbb75bac67da3a394140cd051639a0 | |
| parent | a13aca1a8e76765af911beabbded4e84b6d5703e (diff) | |
Notes
| -rw-r--r-- | sys/net/if.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index b93e81b113c6..f6728dff2d2b 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -444,7 +444,7 @@ if_attach(struct ifnet *ifp) sdl->sdl_data[--namelen] = 0xff; ifa->ifa_refcnt = 1; TAILQ_INSERT_HEAD(&ifp->if_addrhead, ifa, ifa_link); - ifp->if_broadcastaddr = 0; /* reliably crash if used uninitialized */ + ifp->if_broadcastaddr = NULL; /* reliably crash if used uninitialized */ ifp->if_snd.altq_type = 0; ifp->if_snd.altq_disc = NULL; ifp->if_snd.altq_flags &= ALTQF_CANTCHANGE; @@ -493,6 +493,8 @@ if_attachdomain1(struct ifnet *ifp) if (ifp->if_afdata_initialized) { IF_AFDATA_UNLOCK(ifp); splx(s); + printf("if_attachdomain called more than once on %s\n", + ifp->if_xname); return; } ifp->if_afdata_initialized = 1; @@ -1920,15 +1922,15 @@ if_start(struct ifnet *ifp) { NET_ASSERT_GIANT(); - - if ((ifp->if_flags & IFF_NEEDSGIANT) != 0 && debug_mpsafenet != 0) { - if (mtx_owned(&Giant)) - (*(ifp)->if_start)(ifp); - else + + if ((ifp->if_flags & IFF_NEEDSGIANT) != 0 && debug_mpsafenet != 0) { + if (mtx_owned(&Giant)) + (*(ifp)->if_start)(ifp); + else taskqueue_enqueue(taskqueue_swi_giant, &ifp->if_starttask); - } else - (*(ifp)->if_start)(ifp); + } else + (*(ifp)->if_start)(ifp); } static void |
