From a52077d909a177ba3aa5880fd5fe8d88b6506336 Mon Sep 17 00:00:00 2001 From: pooka Date: Mon, 17 Nov 2014 13:58:53 +0000 Subject: [PATCH] Make ifconfig destroy work if INET6 is present but not attached --- sys/net/if.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 3ac3e2ec6b21..c1333b8e2bd1 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.292 2014/11/07 12:57:42 christos Exp $ */ +/* $NetBSD: if.c,v 1.293 2014/11/17 13:58:53 pooka Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.292 2014/11/07 12:57:42 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.293 2014/11/17 13:58:53 pooka Exp $"); #include "opt_inet.h" @@ -891,7 +891,8 @@ again: pktq_barrier(ip_pktq); #endif #ifdef INET6 - pktq_barrier(ip6_pktq); + if (in6_present) + pktq_barrier(ip6_pktq); #endif xc = xc_broadcast(0, (xcfunc_t)nullop, NULL, NULL); xc_wait(xc);