From 35af0a1c6e3fca9719d837c9ff0b9c9526fc738f Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Mon, 11 Jul 2005 23:05:49 +0000 Subject: rev 1.12 When session is over, IPv6 default route to tun should be removed, too. From ume FreeBSD --- usr.sbin/ppp/ppp/ncpaddr.c | 7 +++++-- 1 file 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 @@ -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 -- cgit v1.2.3