From 9793fe5ec57b4930863c89a5cef53b9ccadda06f Mon Sep 17 00:00:00 2001 From: mpi Date: Sun, 25 Oct 2015 13:52:45 +0000 Subject: [PATCH] Do not overwrite if_rtrequest() if the driver specified it *before* calling if_attach(). --- sys/net/if.c | 5 +++-- 1 file 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), -- 2.20.1