diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-07-11 23:05:49 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-07-11 23:05:49 +0000 |
commit | 35af0a1c6e3fca9719d837c9ff0b9c9526fc738f (patch) | |
tree | 4db0dadeae6c43e9577c816f6e837d012bbc2c99 | |
parent | a63db0733bf171e487466e8dd58350b18a6db1a7 (diff) |
rev 1.12
When session is over, IPv6 default route to tun should be
removed, too.
From ume FreeBSD
-rw-r--r-- | usr.sbin/ppp/ppp/ncpaddr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ppp/ncpaddr.c b/usr.sbin/ppp/ppp/ncpaddr.c index 051fe01c6a8..f99aa46004b 100644 --- a/usr.sbin/ppp/ppp/ncpaddr.c +++ b/usr.sbin/ppp/ppp/ncpaddr.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: ncpaddr.c,v 1.8 2005/07/11 22:34:56 brad Exp $ + * $OpenBSD: ncpaddr.c,v 1.9 2005/07/11 23:05:48 brad Exp $ */ #include <sys/types.h> @@ -713,7 +713,10 @@ ncprange_setsa(struct ncprange *range, const struct sockaddr *host, case AF_INET6: range->ncprange_family = AF_INET6; range->ncprange_ip6addr = host6->sin6_addr; - range->ncprange_ip6width = mask6 ? mask62bits(&mask6->sin6_addr) : 128; + if (IN6_IS_ADDR_UNSPECIFIED(&host6->sin6_addr)) + range->ncprange_ip6width = 0; + else + range->ncprange_ip6width = mask6 ? mask62bits(&mask6->sin6_addr) : 128; break; #endif |