Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
src: Fix bridge_rtdelete
details: https://anonhg.NetBSD.org/src/rev/fc544399e66a
branches: trunk
changeset: 318009:fc544399e66a
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Apr 10 07:05:39 2018 +0000
description:
Fix bridge_rtdelete
It removes a rtable entry that belongs to a specified interface, however, its
original behavior was to delete all belonging entries. Restore the original
behavior.
diffstat:
sys/net/if_bridge.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 85a037766c3c -r fc544399e66a sys/net/if_bridge.c
--- a/sys/net/if_bridge.c Tue Apr 10 06:32:23 2018 +0000
+++ b/sys/net/if_bridge.c Tue Apr 10 07:05:39 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bridge.c,v 1.148 2018/01/15 09:49:16 maxv Exp $ */
+/* $NetBSD: if_bridge.c,v 1.149 2018/04/10 07:05:39 ozaki-r Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.148 2018/01/15 09:49:16 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.149 2018/04/10 07:05:39 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_bridge_ipf.h"
@@ -2299,6 +2299,8 @@
{
struct bridge_rtnode *brt;
+ /* XXX pserialize_perform for each entry is slow */
+again:
BRIDGE_RT_LOCK(sc);
LIST_FOREACH(brt, &sc->sc_rtlist, brt_list) {
if (brt->brt_ifp == ifp)
@@ -2313,6 +2315,8 @@
BRIDGE_RT_UNLOCK(sc);
bridge_rtnode_destroy(brt);
+
+ goto again;
}
/*
Home |
Main Index |
Thread Index |
Old Index