Re: [patch] Fix ppp/slip wrong behaviour in 2.2.14

From: Stanislav V. Voronyi (stas@esc.kharkov.com)
Date: Fri Feb 04 2000 - 12:59:57 EST


In message <00020412430101.04420@argo.linuxcare.com.au> Paul Mackerras
    writes:

>> Have you ever run modem pool with dozens of discret modems
>> on analog telephone lines with awful quality ? I do. And I every
>> day oblige to use kill -9 xxxx as last method to kill hanged pppd
>> process. And now with 2.2 kernel I oblige to seek ppp interface

>OK, well there is a problem needing to be fixed there, then. I would
>rather find out why pppd doesn't terminate on a SIGTERM than just accept
>killing it with SIGKILL.

        I apologize in anticipation about my poor english. I'll try to
explain the situation. I work in Ukraine where quality of telephone
lines very bad. Some times modems on our modem pool does not hanging up
when clients modem disconected, but it detect that something going wrong
and turn RTS off, but live DCD on. When buffer of terminal driver will filled
pppd try to send echo request and it lead to hanging of pppd - it calls
write() and kernel does not return from this write() system call back to pppd.
Thats how its going as for me. I could be wrong because I have not enough
time for analizing this problem - I have to fix this as fast as possible.
But the fact is still the fact - pppd often (as for me) hangs and can't
be killed by SIGTERM.

>> and than do ifconfig pppXX down since in 2.2 it does not close
>> automaticaly, what my patch fixed.

>I would rather backport the new driver from 2.3 once it stabilizes. I
>changed the 2.2 driver to do what it does because so many people were
>complaining that they couldn't get connection statistics reliably when the
>connection was terminated by the modem hanging up.

        In normal circumstances when pppd work my patch is not needed.
If pppd caught SIGHUP it shutdown interface first and than change line
discipline. So it is not needing to care about statistics when all thing
goes as its ought to be. But I repeat my question: who will care about
network interface if pppd fail.

>> But if pppd fails undepend on reason ppp interface must be closed.
>> And this kernel job isn't it ?

>Sure. But there is no good way to do this using just a line discipline.

        To my mind using of line discipline is enough. tty driver always
set discipline back to N_TTY on last close and call ldisc->stop function
before setting new discipline. Since my function check state of dev->start
flag, dev_close() function will be called only if pppd failed - killed by
signal 9 or caught another fatal signal (SIGSEGV, etc.).

>> Do you suppouse that if this bug fixed in 2.3 kernel its good reason
>> to not fix in 2.2 kernel ? And apart from ppp there is also slip driver with
>> the same problems. And for slip both problems still have place in 2.3 kernel
>> too.

>Well, I don't particularly care what happens to the slip driver.

        But for me slip driver as important as ppp - my clients use both of them.
And to my mind fixing bugs in slip driver.

        Personaly I've already instaled this patch on all my servers, but I think
that I am not only one who have met with this problems. Thats why I post here patch
for 2.2 kernel. But when 2.4 will be released I want to have this problems already
fixed in it and I made patch for kernel 2.3.
        Personaly I'm don't care how it will be done, if you find my method of sending
SIGHUP to pppd inapropriate please make the same thing in another way. But us I undersatnd
from you letter nobody care about SLIP, so why not add to 2.3 kernel my fixes for SLIP
driver ?

Cheers,

-- 
Stanislav V. Voroniy                            |Tel. +380 (572) 128302
Head of System Administration Department        |                210901
Centre of Information Technologies "Vostok" Ltd.|Fax. +380 (572) 213117

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Feb 07 2000 - 21:00:11 EST