diff options
author | ume <ume@FreeBSD.org> | 2003-03-25 17:01:39 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2003-03-25 17:01:39 +0000 |
commit | f455bf97a44f19d885696cfb1d0255957bf0e024 (patch) | |
tree | 46836c5b1a57053edc7378a8887d0ea6241aaf28 /usr.sbin/ppp | |
parent | 0eaa0a5cbf85bca581ad2df748007fa58620a798 (diff) | |
download | FreeBSD-src-f455bf97a44f19d885696cfb1d0255957bf0e024.zip FreeBSD-src-f455bf97a44f19d885696cfb1d0255957bf0e024.tar.gz |
Once ppp session is over, the route to ff02::tun0/32 was
deleted, and never came back. Now, the route to
ff02::tun0/32 is installed at the end of IPV6CP negitiaton.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/ipv6cp.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/ppp/ipv6cp.c b/usr.sbin/ppp/ipv6cp.c index d89595e..02c30bf 100644 --- a/usr.sbin/ppp/ipv6cp.c +++ b/usr.sbin/ppp/ipv6cp.c @@ -81,6 +81,12 @@ #ifndef NOINET6 +#define IN6ADDR_LINKLOCAL_MCAST_INIT \ + {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}} +static const struct in6_addr in6addr_linklocal_mcast = + IN6ADDR_LINKLOCAL_MCAST_INIT; + static int ipv6cp_LayerUp(struct fsm *); static void ipv6cp_LayerDown(struct fsm *); static void ipv6cp_LayerStart(struct fsm *); @@ -190,7 +196,8 @@ ipcp_SetIPv6address(struct ipv6cp *ipv6cp, u_char *myifid, u_char *hisifid) { struct bundle *bundle = ipv6cp->fsm.bundle; struct in6_addr myaddr, hisaddr; - struct ncprange myrange; + struct ncprange myrange, range; + struct ncpaddr addr; struct sockaddr_storage ssdst, ssgw, ssmask; struct sockaddr *sadst, *sagw, *samask; @@ -227,6 +234,10 @@ ipcp_SetIPv6address(struct ipv6cp *ipv6cp, u_char *myifid, u_char *hisifid) iface_Clear(bundle->iface, &bundle->ncp, AF_INET6, IFACE_CLEAR_ALIASES|IFACE_SYSTEM); + ncpaddr_setip6(&addr, &in6addr_linklocal_mcast); + ncprange_set(&range, &addr, 32); + rt_Set(bundle, RTM_ADD, &range, &ipv6cp->myaddr, 1, 0); + if (bundle->ncp.cfg.sendpipe > 0 || bundle->ncp.cfg.recvpipe > 0) { ncprange_getsa(&myrange, &ssgw, &ssmask); if (ncpaddr_isset(&ipv6cp->hisaddr)) |