OSDN Git Service

net: Force PPPoLAC and PPPoPNS to bind an interface before creating PPP channel.
authorChia-chi Yeh <chiachi@android.com>
Thu, 9 Jul 2009 04:49:13 +0000 (12:49 +0800)
committerChia-chi Yeh <chiachi@android.com>
Thu, 9 Jul 2009 04:49:13 +0000 (12:49 +0800)
commitf7f6469023c8c704157f9932a7639b70936d44b6
treef7663ae727de5484491f6938fdbdedbe2cac4adc
parenteebb2700cba487bcda8da153c2e0813ce4b5a11d
net: Force PPPoLAC and PPPoPNS to bind an interface before creating PPP channel.

It is common to manipulate the routing table after configuring PPP device.
Since both PPPoLAC and PPPoPNS run over IP, care must be taken to make sure
that there is no loop in the routing table.
Although this can be done by adding a host route, it might still cause
problems when the interface is down for some reason.

To solve this, this patch forces both drivers to bind an interface before
creating PPP channel, so the system will not re-route the tunneling sockets
to another interface when the original one is down. Another benefit is that
now the host route is no longer required, so there is no need to remove it
when PPP channel is closed.

Signed-off-by: Chia-chi Yeh <chiachi@android.com>
drivers/net/pppolac.c
drivers/net/pppopns.c