Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Aug 1999 22:58:51 +0300 (EEST)
From:      Vsevolod Lobko <seva@sevasoft.alex-ua.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/13046: [PATCH] ppp don't close session on modem hangup
Message-ID:  <199908091958.WAA22147@sevasoft.alex-ua.com>

next in thread | raw e-mail | index | archive | help

>Number:         13046
>Category:       bin
>Synopsis:       [PATCH] ppp don't close session on modem hangup
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug  9 13:00:03 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Vsevolod Lobko
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
None
>Environment:

uname -a:
FreeBSD sevasoft.alex-ua.com 4.0-CURRENT FreeBSD 4.0-CURRENT #32: Sat Aug  7 10:10:23 EEST 1999     root@sevasoft.alex-ua.com:/usr/src/sys/compile/SEVASOFT  i386

dialup link using userlevel ppp

>Description:

when modem hangs up, ppp does not get hangup signal
This happens because of setting CLOCAL & HUPCL flags for modem tty 
simultaneously

>How-To-Repeat:

hungup modem while online

>Fix:
	

Index: tty.c
===================================================================
RCS file: /home/free_rep/src/usr.sbin/ppp/tty.c,v
retrieving revision 1.10
diff -u -r1.10 tty.c
--- tty.c	1999/08/06 20:04:07	1.10
+++ tty.c	1999/08/09 19:44:06
@@ -204,8 +204,10 @@
     else
       ios.c_cflag |= CLOCAL;
 
-    if (p->type != PHYS_DEDICATED)
+    if (p->type != PHYS_DEDICATED) {
       ios.c_cflag |= HUPCL;
+      ios.c_cflag &= ~CLOCAL;
+    }
 
     tcsetattr(p->fd, TCSANOW, &ios);
   }
@@ -410,8 +412,10 @@
     ios.c_iflag |= IXOFF;
   }
   ios.c_iflag |= IXON;
-  if (p->type != PHYS_DEDICATED)
+  if (p->type != PHYS_DEDICATED) {
     ios.c_cflag |= HUPCL;
+    ios.c_cflag &= ~CLOCAL;
+  }
 
   if (p->type != PHYS_DIRECT) {
       /* Change tty speed when we're not in -direct mode */

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908091958.WAA22147>