As I mentioned in my previous email, I found a couple small bugs in PPP
tonight. My apologies if these have been brought up before - I just
joined the linux-ppp mailing list. Also my net connectivity is temporarily
quite limited so I'm unable to search the archives. My humble apologies.
Three things:
* In linux-2.3.13/drivers/net/ppp_async.c (==FILEVERSION 990806==)
in process_input_packet(), there is a line "int code = 0;".
The value "code" is later passed to ppp_input_error(). However,
"code" is never modified, so you might as well pass a constant
zero.
* In the same file, in ppp_async_ioctl, there is the following code:
case PPPIOCGFLAGS:
val = ap->flags | ap->rbits;
if (put_user(ap->flags, (int *) arg))
break;
Clearly, the put_user() should be of "val", not "ap->flags".
* In ppp-pre-2.3.9/pppd/sys-linux.c:defaultroute_exists(), the
netmask is never checked, so a host route to 0.0.0.0 (yes,
it's meaningless but possible) will trick it into thinking
there is a default route. I think you need something like
if (((struct sockaddr_in *) (&rt->rt_dst))->sin_addr.s_addr == 0L) {
if(kernel_version > KVERSION(2,1,0)) {
if (((struct sockaddr_in *) (&rt->rt_genmask))->sin_addr.s_addr != 0L)
continue;
}
result = 1;
break;
}
-Mitch
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]