Date: Tue, 12 Mar 1996 09:30:34 +0200 (SAT) From: R Bezuidenhout <rbezuide@mikom.csir.co.za> To: hackers@freebsd.org Subject: UP/DOWN ?bug? with slattach Message-ID: <199603120730.JAA07648@zibbi.mikom.csir.co.za>
next in thread | raw e-mail | index | archive | help
Hi all I have experienced the following problem with slattach on a system running FreeBSD 2.1-STABLE with a multiport io card. Setup >more /etc/start_if.sl0 slattach -a -h -s 9600 /dev/aso01 in sysconfig ifconfig_sl0="inet 146.64.54.9 146.64.54.10 netmask 255.255.255.252" The same on another FreeBSD 2.1-STABLE machine with the appropriate ifconfig. Symptoms: If both the routers boot at the same time, the link UPs and I can ping between the two machines. If I now disconnects the table at the back (break the link) the devices DOWN ... everything is fine up to now. I then reconnect the cables and the devices UP, but down if I ping I get a "Network is down" response and with a 'netstat -i' I see that there are no packets going out the interface. If I reboot one of the machines it sends the packets but the other side can't reply. I've played around and found that adding -l to slattach prevents the device from going DOWN and thus in a way solves the problem, but now it would be impossible to notice that the line has gone down. After reading the man page carefully I tried to add a -r '/mydir/dummy.redial' to slattach and removing the -l. The dummy.redial script does an echo and that is all. Everything them works fine when I disconnect the cables (device DOWNs) and reconnects and then I can ping again. I had a look at the source code of slattach as I don't see that it is necessary to have a -r option to get it to wotk with modem control set to on. I made apatch that solved my problem and I have tested a few senarios and to date nothing broke :), but I am not sure. So .. if anyone can have a look at the patch and see if it is all right I would appreciate it. It seems that a call to acquire_line() was forgotten. Thanx Reinier Summary: If slip device DOWN/UP with no -l or -r option set in slattach a "Network is down" error occurs. Patch: *** /usr/src/sbin/slattach/slattach.c Thu Oct 26 08:44:37 1995 --- slattach.c Mon Mar 11 16:28:12 1996 *************** *** 497,502 **** --- 497,503 ---- syslog(LOG_NOTICE, "SIGHUP on %s (sl%d); exiting", dev, unit); exit_handler(0); #endif + acquire_line(); if (ioctl(fd, TIOCSETD, &ttydisc) < 0) { syslog(LOG_ERR, "ioctl(TIOCSETD): %m"); exit_handler(1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603120730.JAA07648>