Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Dec 1995 13:23:14 GMT
From:      nnd@itfs.nsk.su (Nickolay N. Dudorov)
To:        questions@freebsd.org
Subject:   Re: Problems, 2.1.0-RELEASE/networking/SLIP
Message-ID:  <DJ0IIr.BpF@itfs.nsk.su>
References:  <Pine.BSF.3.91.951202170517.306B-100000@riley-net170-164.uoregon.edu>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Doug White (dwhite@riley-net170-164.uoregon.edu) wrote:
> On Fri, 1 Dec 1995, Greenstein Jacob wrote:
> 
> [stuff deleted]
> > reconnect. With FreeBSD 2.0.5 slattach used to distuinguish that
> > carrier has disappeared and recover SLIP connection after modems
> > became connected. In 2.1.0 slattach determines whenever carrier
> > disappear and appear, but never recovers the SLIP connection.
> > I am starting slattach in /etc/rc.local as 
> > 	slattach -h -s 38400 /dev/cuaa2
> 
> You need to add a -r option to slattach.  Check the man page for details.
> 

	You can also applay following patch to
/usr/src/sbin/slattach/slattach.c and avoid using (very artificial
in your case) '-r option'.

	N.Dudorov
--------------------------------------------------------
--- slattach210.c	Sun Dec  3 19:19:06 1995
+++ slattach.c	Sun Dec  3 19:19:16 1995
@@ -518,6 +518,18 @@
 			}
 			syslog(LOG_NOTICE, "Carrier now present on %s (sl%d)",
 			       dev, unit);
+  			/* This HACK clears TS_ZOMBIE flag and set */
+                        /* TS_CONNECTED, which is otherwise remains unset. */
+  			tty.c_cflag |= CLOCAL;
+  			if (tcsetattr(fd, TCSAFLUSH, &tty) < 0) {
+  				syslog(LOG_ERR, "tcsetattr(TCSAFLUSH): %m");
+  				exit_handler(1);
+  			}
+  			tty.c_cflag &= ~CLOCAL;
+  			if (tcsetattr(fd, TCSAFLUSH, &tty) < 0) {
+  				syslog(LOG_ERR, "tcsetattr(TCSAFLUSH): %m");
+  				exit_handler(1);
+  			}
 		}
 	}
 	slip_discipline();



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?DJ0IIr.BpF>