X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=pppd%2Fsys-linux.c;h=4fe221d86549ba9efeb204db375e093eebfceba0;hb=d8a66adf98a0e525cf38031b42098d539da6eeb6;hp=67b50cb663fa827051dc4480116f72e259dfd516;hpb=2f2eb859fbf6e861ca5f039ef77add6513932eb4;p=ppp.git diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index 67b50cb..4fe221d 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -1658,6 +1658,8 @@ int cifdefaultroute (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; @@ -2016,7 +2018,7 @@ ppp_registered(void) int ppp_available(void) { - int s, ok, fd, err; + int s, ok, fd; struct ifreq ifr; int size; int my_version, my_modification, my_patch; @@ -2039,7 +2041,6 @@ int ppp_available(void) close(fd); return 1; } - err = errno; if (kernel_version >= KVERSION(2,3,13)) { error("Couldn't open the /dev/ppp device: %m"); @@ -2231,9 +2232,10 @@ int sifvjcomp (int u, int vjcomp, int cidcomp, int maxcid) u_int x; if (vjcomp) { - if (ioctl(ppp_dev_fd, PPPIOCSMAXCID, (caddr_t) &maxcid) < 0) + if (ioctl(ppp_dev_fd, PPPIOCSMAXCID, (caddr_t) &maxcid) < 0) { error("Couldn't set up TCP header compression: %m"); - vjcomp = 0; + vjcomp = 0; + } } x = (vjcomp? SC_COMP_TCP: 0) | (cidcomp? 0: SC_NO_TCP_CCID);