> This is essential. Without it only pppd can know what unit was
> allocated for a particular line. Without knowing the unit we
> cannot know which interface we have just started.
Ok, then something like the following patch can be applied.
-- Fedor Bezrukov E-Mail: fedor@ms2.inr.ac.ru Physics Department of MSU http://www.inr.ac.ru/~fedor/ Institute for Nuclear Research Tel: 135-20-51
--- orig/linux/drivers/net/ppp_async.c Thu Sep 2 16:17:46 1999 +++ linux/drivers/net/ppp_async.c Fri Oct 22 16:13:41 1999 @@ -64,6 +64,7 @@ struct ppp_channel chan; /* interface to generic ppp layer */ int connected; + int index; unsigned char obuf[OBUFSIZE]; }; @@ -387,6 +388,7 @@ if (err != 0) break; ap->connected = 1; + ap->index = val; break; case PPPIOCDETACH: err = -ENXIO; @@ -394,6 +396,14 @@ break; ppp_unregister_channel(&ap->chan); ap->connected = 0; + err = 0; + break; + case PPPIOCGUNIT: + err = -ENXIO; + if (!ap->connected) + break; + if (put_user(ap->index, (int *) arg)) + break; err = 0; break;
-- Fedor Bezrukov E-Mail: fedor@ms2.inr.ac.ru Physics Department of MSU http://www.inr.ac.ru/~fedor/ Institute for Nuclear Research Tel: 135-20-51
- 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/