panic in rtsock.c

Gleb Smirnoff glebius at FreeBSD.org
Mon Mar 26 12:26:27 UTC 2007


  Boris, Yuriy,

On Mon, Mar 26, 2007 at 03:33:03AM +0400, Boris Samorodov wrote:
B> On Sun, 25 Mar 2007 16:57:35 +0400 (MSD) Yuriy Tsibizov wrote:
B> 
B> > > I'm getting repeatable panic with kernel & userland from yesterday
B> > > evening when I try to connect to Internet using bluetooth to connect
B> > > to my phone:
B> > > "rfcomm_pppd -a e60 -c -C dun -l mts".
B> 
B> > The same panic accurs when I use /usr/sbin/ppp (with old V.34 modem).
B> > It does not panic (in rtsock.c) when I use mpd.
B> 
B> The same here, panic when ppp is started. Any news?

Can you please try the attached patch?

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
-------------- next part --------------
Index: rtsock.c
===================================================================
RCS file: /home/ncvs/src/sys/net/rtsock.c,v
retrieving revision 1.140
diff -u -p -r1.140 rtsock.c
--- rtsock.c	22 Mar 2007 10:51:03 -0000	1.140
+++ rtsock.c	26 Mar 2007 09:44:53 -0000
@@ -514,7 +514,9 @@ route_output(struct mbuf *m, struct sock
 					senderr(error);
 				RT_LOCK(rt);
 			}
-			if (info.rti_ifa != rt->rt_ifa && rt->rt_ifa != NULL &&
+			if (info.rti_ifa != NULL &&
+			    info.rti_ifa != rt->rt_ifa &&
+			    rt->rt_ifa != NULL &&
 			    rt->rt_ifa->ifa_rtrequest != NULL) {
 				rt->rt_ifa->ifa_rtrequest(RTM_DELETE, rt,
 				    &info);
@@ -528,12 +530,11 @@ route_output(struct mbuf *m, struct sock
 				}
 				rt->rt_flags |= RTF_GATEWAY;
 			}
-			if (info.rti_ifa != rt->rt_ifa) {
+			if (info.rti_ifa != NULL &&
+			    info.rti_ifa != rt->rt_ifa) {
+				IFAREF(info.rti_ifa);
 				rt->rt_ifa = info.rti_ifa;
-				if (info.rti_ifa != NULL) {
-					IFAREF(info.rti_ifa);
-					rt->rt_ifp = info.rti_ifp;
-				}
+				rt->rt_ifp = info.rti_ifp;
 			}
 			/* Allow some flags to be toggled on change. */
 			if (rtm->rtm_fmask & RTF_FMASK)


More information about the freebsd-current mailing list