X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsys-svr4.c;h=d525064e10dd54f3ba6094dbb7cb183ee6f19b07;hp=17b208c87d17ffb688fd0b4e1cde447817a0e12c;hb=f0a6c417e65393d127a9f0fe0ba668ec2d2fdf3b;hpb=e15bba841ee500abc715fccf876fed4dd2462b1b diff --git a/pppd/sys-svr4.c b/pppd/sys-svr4.c index 17b208c..d525064 100644 --- a/pppd/sys-svr4.c +++ b/pppd/sys-svr4.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-svr4.c,v 1.21 1999/03/08 01:46:49 paulus Exp $"; +static char rcsid[] = "$Id: sys-svr4.c,v 1.23 1999/03/08 05:34:46 paulus Exp $"; #endif #include @@ -628,14 +628,6 @@ restore_tty(fd) } } -/* - * hangup_modem - hang up the modem by clearing DTR. - */ -void hangup_modem(int ttyfd) -{ - setdtr(ttyfd, 0); -} - /* * setdtr - control the DTR line on the serial port. * This is called from die(), so it shouldn't call die(). @@ -1729,6 +1721,7 @@ cifroute(u, our, his) /* * have_route_to - determine if the system has a route to the specified * IP address. Returns 0 if not, 1 if so, -1 if we can't tell. + * `addr' is in network byte order. * For demand mode to work properly, we have to ignore routes * through our own interface. */ @@ -1818,7 +1811,7 @@ have_route_to(addr) syslog(LOG_DEBUG, "have_route_to: dest=%x gw=%x mask=%x\n", rp->ipRouteDest, rp->ipRouteNextHop, rp->ipRouteMask); - if (((addr ^ rp->ipRouteDest) && rp->ipRouteMask) == 0 + if (((addr ^ rp->ipRouteDest) & rp->ipRouteMask) == 0 && rp->ipRouteNextHop != remote_addr) return 1; }