Module Name: src Committed By: ozaki-r Date: Tue Apr 10 07:05:39 UTC 2018
Modified Files: src/sys/net: if_bridge.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/sys/net/if_bridge.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_bridge.c diff -u src/sys/net/if_bridge.c:1.148 src/sys/net/if_bridge.c:1.149 --- src/sys/net/if_bridge.c:1.148 Mon Jan 15 09:49:16 2018 +++ src/sys/net/if_bridge.c Tue Apr 10 07:05:39 2018 @@ -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 @@ bridge_rtdelete(struct bridge_softc *sc, { 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_rtdelete(struct bridge_softc *sc, BRIDGE_RT_UNLOCK(sc); bridge_rtnode_destroy(brt); + + goto again; } /*