X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsys-linux.c;h=76fda67b3f9e94f5f59145b0e4d6eaff966a6c28;hp=f391dac082ad1993042c853ec604514e497baf4c;hb=c30d204fe82b18fb9668a05afb587a37f981696c;hpb=5580a43ba47c96ff41046226a9409c31b5efc8d2 diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index f391dac..76fda67 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -127,7 +127,7 @@ static int master_fd = -1; #ifdef INET6 static int sock6_fd = -1; #endif /* INET6 */ -static int ppp_dev_fd = -1; /* fd for /dev/ppp (new style driver) */ +int ppp_dev_fd = -1; /* fd for /dev/ppp (new style driver) */ static int chindex; /* channel index (new style driver) */ static fd_set in_fds; /* set of fds that wait_input waits for */ @@ -946,6 +946,7 @@ void output (int unit, unsigned char *p, int len) int proto; dump_packet("sent", p, len); + if (snoop_send_hook) snoop_send_hook(p, len); if (len < PPP_HDRLEN) return; @@ -1512,6 +1513,8 @@ int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway) SET_SA_FAMILY (rt.rt_dst, AF_INET); SET_SA_FAMILY (rt.rt_gateway, AF_INET); + rt.rt_dev = ifname; + if (kernel_version > KVERSION(2,1,0)) { SET_SA_FAMILY (rt.rt_genmask, AF_INET); SIN_ADDR(rt.rt_genmask) = 0L;