diff options
author | peter <peter@FreeBSD.org> | 1998-03-27 14:30:18 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-03-27 14:30:18 +0000 |
commit | 3d734edb311ba30019eb2e67eb061488e5ccd57a (patch) | |
tree | 7722965f38d54032895fcce391515c0fb3b337d8 /sys/netinet/in_rmx.c | |
parent | eb56ae7c97306af69b04f9d508310ce5bc1678d4 (diff) | |
download | FreeBSD-src-3d734edb311ba30019eb2e67eb061488e5ccd57a.zip FreeBSD-src-3d734edb311ba30019eb2e67eb061488e5ccd57a.tar.gz |
A fix for a link down route cleanup panic, when the route cleanup
pulls the rug out from underneath itself.
Obtained from: wollman (a few months ago, I've been using this for ages)
Diffstat (limited to 'sys/netinet/in_rmx.c')
-rw-r--r-- | sys/netinet/in_rmx.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/netinet/in_rmx.c b/sys/netinet/in_rmx.c index a215169..b0f24d7 100644 --- a/sys/netinet/in_rmx.c +++ b/sys/netinet/in_rmx.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: in_rmx.c,v 1.31 1998/02/04 22:33:05 eivind Exp $ + * $Id: in_rmx.c,v 1.32 1998/02/06 12:13:50 eivind Exp $ */ /* @@ -378,6 +378,15 @@ in_ifadownkill(struct radix_node *rn, void *xap) int err; if (rt->rt_ifa == ap->ifa && !(rt->rt_flags & RTF_STATIC)) { + /* + * We need to disable the automatic prune that happens + * in this case in rtrequest() because it will blow + * away the pointers that rn_walktree() needs in order + * continue our descent. We will end up deleting all + * the routes that rtrequest() would have in any case, + * so that behavior is not needed there. + */ + rt->rt_flags &= ~RTF_PRCLONING; err = rtrequest(RTM_DELETE, (struct sockaddr *)rt_key(rt), rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0); if (err) { |