From b706c03da04f075acd307bea96313bbabceddf04 Mon Sep 17 00:00:00 2001 From: Hajimu UMEMOTO Date: Sat, 5 Apr 2003 10:10:33 +0000 Subject: [PATCH] When session is over, IPv6 default route to tun should be removed, too. MFC after: 1 week --- usr.sbin/ppp/ncpaddr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/ppp/ncpaddr.c b/usr.sbin/ppp/ncpaddr.c index 1f84f922fdff..ea491f16f878 100644 --- a/usr.sbin/ppp/ncpaddr.c +++ b/usr.sbin/ppp/ncpaddr.c @@ -725,7 +725,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