Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

route flush seg fault



I am getting an error with "shutdown -p now" on my powermac 7200.  I
think it is caused by "route flush":

/netbsd: trap: pid 226.1 (route): user read DSI trap @ 0x4 by 0x1808a50 (DSISR 0x40000000, err=14)

In gdb,

Program terminated with signal SIGSEGV, Segmentation fault.
Reading in symbols for rtutil.c...done.
#0  0x01808a50 in netname (sa=0xfdc01148, mask=0x0, flags=0) at rtutil.c:696
696     rtutil.c: No such file or directory.
(gdb) bt
#0  0x01808a50 in netname (sa=0xfdc01148, mask=0x0, flags=0) at rtutil.c:696
#1  0x01801bfc in flushroutes (argc=1, argv=0xffffddb8, doall=0) at route.c:361
#2  0x01801624 in main (argc=1, argv=0xffffddb8) at route.c:245

In src/sbin/route/rtutil.c, netname(), the mask argument is zero at line 697:

686 /*
687  * Return the name of the network whose address is given.
688  * The address is assumed to be that of a net or subnet, not a host.
689  */
690 char *
691 netname(const struct sockaddr *sa, const struct sockaddr *mask, int flags)
692 {
693     switch (sa->sa_family) {
694 
695     case AF_INET:
696             return netname4(((const struct sockaddr_in *)sa)->sin_addr.s_addr,
697                 ((const struct sockaddr_in *)mask)->sin_addr.s_addr, flags);

It looks to me that maybesrc/sbin/route/route.c line 361 was changed from "routename" to "netname"?
 

356             if (qflag)
357                     continue;
358             if (verbose)
359                     print_rtmsg(rtm, rlen);
360             else {
361                     (void)printf("%-20.20s ", netname(sa, NULL, nflag));
362                     sa = (struct sockaddr *)(RT_ROUNDUP(sa->sa_len) +
363                         (char *)sa);
364                     (void)printf("%-20.20s ", routename(sa, nflag));
365                     (void)printf("done\n");
366             }

"route -v flush" seems to work fine though, or at least not crash.

Thanks


Home | Main Index | Thread Index | Old Index