mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-05 09:14:03 +00:00
avoid duplicated rtfree() on default router list change (could cause panic).
sync with kame 1.46 -> 1.47.
This commit is contained in:
parent
546ba87f85
commit
2022007008
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=64540
@ -1,5 +1,5 @@
|
||||
/* $FreeBSD$ */
|
||||
/* $KAME: nd6_rtr.c,v 1.43 2000/07/02 23:19:59 itojun Exp $ */
|
||||
/* $KAME: nd6_rtr.c,v 1.47 2000/08/08 08:58:42 jinmei Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
@ -546,12 +546,15 @@ defrouter_delreq(dr, dofree)
|
||||
(struct sockaddr *)&mask,
|
||||
RTF_GATEWAY, &oldrt);
|
||||
if (oldrt) {
|
||||
#ifdef ND6_USE_RTSOCK
|
||||
defrouter_msg(RTM_DELETE, oldrt);
|
||||
#endif
|
||||
if (oldrt->rt_refcnt <= 0)
|
||||
oldrt->rt_refcnt++; /* XXX */
|
||||
rtfree(oldrt);
|
||||
if (oldrt->rt_refcnt <= 0) {
|
||||
/*
|
||||
* XXX: borrowed from the RTM_DELETE case of
|
||||
* rtrequest().
|
||||
*/
|
||||
oldrt->rt_refcnt++;
|
||||
rtfree(oldrt);
|
||||
}
|
||||
}
|
||||
|
||||
if (dofree) /* XXX: necessary? */
|
||||
|
Loading…
Reference in New Issue
Block a user