[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pppd and direct lines



I finally figured out why pppd doesn't work on direct lines.  This has been
bugging me since OpenBSD 2.3.  I have a proposed fix.

In main.c, line 460, we have this:

	/* run connection script */
	if (connector && connector[0]) {
...
	    set_up_tty(ttyfd, (modem_chat == 0));
	}
...
	if (modem && !modem_chat)
		set_up_tty(ttyfd, 0);

The problem is that if you are on a direct line (no modem option), and you
have no connect script (which is likely in that case), set_up_tty() never
gets called.

My fix is to remove the second conditional, and always call set_up_tty().
This is possibly a wasted call, but I don't think it does any harm.  That's
what the OpenBSD 2.2 pppd did, and that was the last version that worked.

I have tested this in the three main configurations I use: dialin, dialout,
and direct.  It works in all three cases.  There are of course many other
possibilities so more testing would be nice.