kern/149804: [icmp] [panic] ICMP redirect on causes "panic: rtqkill route really not free"

Pete French pete at twisted.org.uk
Fri Sep 17 12:50:04 UTC 2010


The following reply was made to PR kern/149804; it has been noted by GNATS.

From: Pete French <pete at twisted.org.uk>
To: bug-followup at FreeBSD.org,
 petefrench at ticketswitch.com
Cc:  
Subject: Re: kern/149804: [icmp] [panic] ICMP redirect on causes "panic: rtqkill route really not free"
Date: Fri, 17 Sep 2010 13:44:14 +0100

 Here is the patch I am currently using which makes the problem go away. =
 As states above, this was sent to me by Xin Li - it's not my own work!
 
 Index: sys/netinet/in_rmx.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 --- sys/netinet/in_rmx.c	(revision 211232)
 +++ sys/netinet/in_rmx.c	(working copy)
 @@ -121,12 +121,13 @@ in_matroute(void *v_arg, struct radix_node_head *h
  	struct radix_node *rn =3D rn_match(v_arg, head);
  	struct rtentry *rt =3D (struct rtentry *)rn;
 =20
 -	/*XXX locking? */
 -	if (rt && rt->rt_refcnt =3D=3D 0) {		/* this is first =
 reference */
 +	if (rt) {
 +		RT_LOCK(rt);
  		if (rt->rt_flags & RTPRF_OURS) {
  			rt->rt_flags &=3D ~RTPRF_OURS;
  			rt->rt_rmx.rmx_expire =3D 0;
  		}
 +		RT_UNLOCK(rt);
  	}
  	return rn;
  }
 


More information about the freebsd-net mailing list