diff options
author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2003-04-04 11:09:08 +0000 |
---|---|---|
committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2003-04-04 11:09:08 +0000 |
commit | 977e6c08fe06b224dade618d01cb7e2d9ebb387f (patch) | |
tree | 7cbf54bcd1cb6a11cb0697650ea2a5597be961d4 /usr.sbin/ppp | |
parent | 0e80a2f601ca25021f7a3fc5460024c5b4e9b5e3 (diff) | |
download | src-test2-977e6c08fe06b224dade618d01cb7e2d9ebb387f.tar.gz src-test2-977e6c08fe06b224dade618d01cb7e2d9ebb387f.zip |
Notes
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/iface.c | 14 | ||||
-rw-r--r-- | usr.sbin/ppp/ipv6cp.c | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/ppp/iface.c b/usr.sbin/ppp/iface.c index e29bf751174a..8a23742a25fa 100644 --- a/usr.sbin/ppp/iface.c +++ b/usr.sbin/ppp/iface.c @@ -83,6 +83,10 @@ #include "prompt.h" #include "iface.h" +#define IN6MASK128 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }}} +static const struct in6_addr in6mask128 = IN6MASK128; + struct iface * iface_Create(const char *name) @@ -333,7 +337,8 @@ iface_addr_Add(const char *name, struct iface_addr *addr, int s) memcpy(&ifra6.ifra_prefixmask, &ssmsk, sizeof ifra6.ifra_prefixmask); if (ncpaddr_family(&addr->peer) == AF_UNSPEC) ifra6.ifra_dstaddr.sin6_family = AF_UNSPEC; - else + else if (memcmp(&((struct sockaddr_in6 *)&ssmsk)->sin6_addr, &in6mask128, + sizeof in6mask128) == 0) memcpy(&ifra6.ifra_dstaddr, &sspeer, sizeof ifra6.ifra_dstaddr); ifra6.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME; ifra6.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; @@ -426,7 +431,7 @@ int iface_Add(struct iface *iface, struct ncp *ncp, const struct ncprange *ifa, const struct ncpaddr *peer, int how) { - int af, n, removed, s, width; + int af, n, removed, s; struct ncpaddr ncplocal; struct iface_addr *addr, newaddr; @@ -452,11 +457,6 @@ iface_Add(struct iface *iface, struct ncp *ncp, const struct ncprange *ifa, return 1; /* Already there */ } - width = -#ifndef NOINET6 - (af == AF_INET6) ? 128 : -#endif - 32; removed = iface_addr_Zap(iface->name, iface->addr + n, s); if (removed) ncp_IfaceAddrDeleted(ncp, iface->addr + n); diff --git a/usr.sbin/ppp/ipv6cp.c b/usr.sbin/ppp/ipv6cp.c index 02c30bf5d03b..b126b0d078f7 100644 --- a/usr.sbin/ppp/ipv6cp.c +++ b/usr.sbin/ppp/ipv6cp.c @@ -224,7 +224,7 @@ ipcp_SetIPv6address(struct ipv6cp *ipv6cp, u_char *myifid, u_char *hisifid) ncpaddr_setip6(&ipv6cp->myaddr, &myaddr); ncpaddr_setip6(&ipv6cp->hisaddr, &hisaddr); - ncprange_sethost(&myrange, &ipv6cp->myaddr); + ncprange_set(&myrange, &ipv6cp->myaddr, 64); if (!iface_Add(bundle->iface, &bundle->ncp, &myrange, &ipv6cp->hisaddr, IFACE_ADD_FIRST|IFACE_FORCE_ADD|IFACE_SYSTEM)) |