Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jul 1996 19:37:29 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-hardware@FreeBSD.org, freebsd-isp@FreeBSD.org, freebsd-questions@FreeBSD.org, stefan@islandia.is
Subject:   Re: Problems with PPP and cyclades (Solved)
Message-ID:  <199607130937.TAA18861@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>Thanks for that program Bruce, it showed us that dcd was still up even though
>we had already hung up the line.  Later I received a fix to modem.c in ppp:

>>>I have experienced a similar problem. I solved it changing the CLOCAL flag
>>>to HUPCL, in modem.c.
>>>
>>>diff modem.c ~wsj/src/ppp/modem.c                   
>>>440c440
>>><     rstio.c_cflag = (CS8 | CREAD | CLOCAL | CCTS_OFLOW|CRTS_IFLOW);
>>>---
>>>>     rstio.c_cflag = (CS8 | CREAD | HUPCL | CCTS_OFLOW|CRTS_IFLOW);
>>>
>>>With this, the ppp program receives a SIGHUP when the modem lost the
>>>carrier, and it terminates in the expected way.

The CLOCAL probably doesn't matter, and HUPCL is only supposed to affect
hangups at your end (it causes DTR to be dropped when the line is closed).

This seems to be fixed in -current by setting HUPCL in some cases:

    if (!(mode & MODE_DEDICATED))
      rstio.c_cflag |= HUPCL;

2.1R is also missing a `modemios = rstio;' statement.

Bruce



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