Re: SE GC83 GPRS card: pppd problem

"Steven M. Bellovin" <[email protected]>
Newsgroups gmane.os.netbsd.current,gmane.os.netbsd.ports.hpcarm
Message-ID <[email protected]>
In message <[email protected]>, Christos Zoulas writes:
>In article <[email protected]>,
>Jachym Holecek  <[email protected]> wrote:
>>> On Jan 30,  5:16pm, [email protected] (Jachym Holecek) wrote:
>>> -- Subject: Re: SE GC83 GPRS card: pppd problem
>>> | 
>>> | I did the same last night (but offline) -- the problem was in main.c
>>> | (in case you really mean sys-bsd.c, I can take a look later in the
>>> | evening)
>>> 
>>> I really meant sys-bsd.c ...
>>
>>dist/pppd/pppd/main.c contains unhandled corner case, the patch
>>below fixed the problem I've reproduced with Alex's setup. The
>>second occupy_stdfds() call is key.
>>
>
>I think that the reason you need the second occupy_stdfds() is because
>of the bug I introduced that closed 0 inadvertently in sys-bsd.c. Maybe
>doing both is ok, but I am not very happy with sandbagging the code without
>a good reason.
>

Trying pppd with just your fix, I get this for open files:

crw-r--r--  1 uucp  wheel  66, 0 Jan 27 20:32 0
-rw-r--r--  1 root  wheel      0 Jan 30 22:21 1
-rwxr-xr-x  1 root  wheel    141 Jan 19 13:52 10
crw-r--r--  1 uucp  wheel  66, 0 Jan 27 20:32 11
-rw-r--r--  1 root  wheel      0 Jan 30 22:21 2

and of course it doesn't work since chat writes to fd1.  I haven't yet 
tried Jachym's fix.

		--Steven M. Bellovin, http://www.cs.columbia.edu/~smb
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.