Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Fix bridge_rtdelete
details: https://anonhg.NetBSD.org/src/rev/f610ed4485d7
branches: trunk
changeset: 321922:f610ed4485d7
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 b39fb5581c9f -r f610ed4485d7 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