Some users have reported that pppd will delete a default route
through another device, for example if they bring up a ppp connection
with default route, then bring up an ethernet interface and set a
default route through that, then take down the ppp connection.
This fixes it, for Linux at least, by specifying the device name on
the default route deletion ioctl, which means that the kernel will
only delete default routes through that device.
Signed-off-by: Paul Mackerras <paulus@samba.org>
SET_SA_FAMILY (rt.rt_dst, AF_INET);
SET_SA_FAMILY (rt.rt_gateway, AF_INET);
SET_SA_FAMILY (rt.rt_dst, AF_INET);
SET_SA_FAMILY (rt.rt_gateway, AF_INET);
if (kernel_version > KVERSION(2,1,0)) {
SET_SA_FAMILY (rt.rt_genmask, AF_INET);
SIN_ADDR(rt.rt_genmask) = 0L;
if (kernel_version > KVERSION(2,1,0)) {
SET_SA_FAMILY (rt.rt_genmask, AF_INET);
SIN_ADDR(rt.rt_genmask) = 0L;