diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-10-25 13:52:46 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-10-25 13:52:46 +0000 |
commit | 28f3ba26f7d7cfd4c02d95df70042a404e9ca73a (patch) | |
tree | 1123e7d53847a360392c464ecdba32bf357be183 /sys/net/if.c | |
parent | acd64a3e2424cfb43d303429be53ba7c81b1e6cd (diff) |
Do not overwrite if_rtrequest() if the driver specified it *before*
calling if_attach().
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index e4691689f8b..c354a905dd1 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.396 2015/10/25 12:05:40 mpi Exp $ */ +/* $OpenBSD: if.c,v 1.397 2015/10/25 13:52:45 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -520,7 +520,8 @@ if_attach_common(struct ifnet *ifp) M_TEMP, M_WAITOK); TAILQ_INIT(ifp->if_detachhooks); - ifp->if_rtrequest = if_rtrequest_dummy; + if (ifp->if_rtrequest == NULL) + ifp->if_rtrequest = if_rtrequest_dummy; ifp->if_slowtimo = malloc(sizeof(*ifp->if_slowtimo), M_TEMP, M_WAITOK|M_ZERO); ifp->if_watchdogtask = malloc(sizeof(*ifp->if_watchdogtask), |