diff options
author | ume <ume@FreeBSD.org> | 2002-05-21 11:43:53 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2002-05-21 11:43:53 +0000 |
commit | 104c6299544249fdb21e666cd635e56a4e4d88b8 (patch) | |
tree | e76ab680199eeba6f513880b35a63ad1116cbbff /sbin | |
parent | d6c7357cf37848243c9948ae2830bbb6392b8074 (diff) | |
download | FreeBSD-src-104c6299544249fdb21e666cd635e56a4e4d88b8.zip FreeBSD-src-104c6299544249fdb21e666cd635e56a4e4d88b8.tar.gz |
Have RTF_HOST for /128 destionation.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/route/route.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index 83ec02e..d5eea5b 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -113,6 +113,9 @@ char *atalk_ntoa(struct at_addr); const char *routename(), *netname(); void flushroutes(), newroute(), monitor(), sockaddr(), sodump(), bprintf(); void print_getmsg(), print_rtmsg(), pmsg_common(), pmsg_addrs(), mask_addr(); +#ifdef INET6 +static int inet6_makenetandmask(struct sockaddr_in6 *); +#endif int getaddr(), rtmsg(), x25_makemask(); int prefixlen(); extern char *iso_ntoa(); @@ -863,7 +866,7 @@ inet_makenetandmask(net, sin, bits) /* * XXX the function may need more improvement... */ -static void +static int inet6_makenetandmask(sin6) struct sockaddr_in6 *sin6; { @@ -885,8 +888,9 @@ inet6_makenetandmask(sin6) if (plen) { rtm_addrs |= RTA_NETMASK; - prefixlen(plen); + return prefixlen(plen); } + return 0; } #endif @@ -1011,9 +1015,10 @@ getaddr(which, s, hpp) su->sin6.sin6_scope_id = 0; } #endif - if (which == RTA_DST) - inet6_makenetandmask(&su->sin6); freeaddrinfo(res); + if (which == RTA_DST) + if (inet6_makenetandmask(&su->sin6) == -1) + return (1); return (0); } #endif /* INET6 */ |