Module Name: src
Committed By: christos
Date: Mon Jul 9 14:54:01 UTC 2018
Modified Files:
src/sys/net: if.c
Log Message:
Calling rtinit(sa_family = AF_LINK, RTM_DELETE, 0) is guaranteed not to
work. Remove bogus call leaving a KASSERT behind.
To generate a diff of this commit:
cvs rdiff -u -r1.429 -r1.430 src/sys/net/if.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.429 src/sys/net/if.c:1.430
--- src/sys/net/if.c:1.429 Mon Jul 2 23:37:03 2018
+++ src/sys/net/if.c Mon Jul 9 10:54:01 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.429 2018/07/03 03:37:03 ozaki-r Exp $ */
+/* $NetBSD: if.c,v 1.430 2018/07/09 14:54:01 christos Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.429 2018/07/03 03:37:03 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.430 2018/07/09 14:54:01 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -595,7 +595,7 @@ if_free_sadl(struct ifnet *ifp, int fact
KASSERT(ifp->if_sadl != NULL);
s = splsoftnet();
- rtinit(ifa, RTM_DELETE, 0);
+ KASSERT(ifa->ifa_addr->sa_family == AF_LINK);
ifa_remove(ifp, ifa);
if_deactivate_sadl(ifp);
splx(s);