diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2022-06-24 10:36:54 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2022-06-24 10:36:54 +0000 |
commit | 1b090d0be03844012b3c5b2345360c8a2a093e2a (patch) | |
tree | 46b35bc2894c4f55d477b7dff8563d05de28923c /usr.sbin/bgpd | |
parent | df8581f07fdc6c3beb91a7268eaabfd3c8617e7d (diff) |
Use IN6_IS_ADDR_MC_NODELOCAL() instead of IN6_IS_ADDR_MC_INTFACELOCAL().
It seems that IN6_IS_ADDR_MC_NODELOCAL() is the official name of this
nightmare and therefor more portable.
OK tb@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/kroute.c | 6 | ||||
-rw-r--r-- | usr.sbin/bgpd/util.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c index 6579a509d6f..db2e8ba7edb 100644 --- a/usr.sbin/bgpd/kroute.c +++ b/usr.sbin/bgpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.268 2022/06/23 13:09:03 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.269 2022/06/24 10:36:53 claudio Exp $ */ /* * Copyright (c) 2022 Claudio Jeker <claudio@openbsd.org> @@ -1626,13 +1626,13 @@ kr6_tofull(struct kroute6 *kr6) /* only set scope_id for link-local addresses because IPv6 */ if (IN6_IS_ADDR_LINKLOCAL(&kr6->prefix) || IN6_IS_ADDR_MC_LINKLOCAL(&kr6->prefix) || - IN6_IS_ADDR_MC_INTFACELOCAL(&kr6->prefix)) + IN6_IS_ADDR_MC_NODELOCAL(&kr6->prefix)) kf.prefix.scope_id = kr6->ifindex; kf.nexthop.aid = AID_INET6; memcpy(&kf.nexthop.v6, &kr6->nexthop, sizeof(struct in6_addr)); if (IN6_IS_ADDR_LINKLOCAL(&kr6->nexthop) || IN6_IS_ADDR_MC_LINKLOCAL(&kr6->nexthop) || - IN6_IS_ADDR_MC_INTFACELOCAL(&kr6->nexthop)) + IN6_IS_ADDR_MC_NODELOCAL(&kr6->nexthop)) kf.nexthop.scope_id = kr6->ifindex; strlcpy(kf.label, rtlabel_id2name(kr6->labelid), sizeof(kf.label)); kf.flags = kr6->flags; diff --git a/usr.sbin/bgpd/util.c b/usr.sbin/bgpd/util.c index 1c0c87b637b..4cd33236933 100644 --- a/usr.sbin/bgpd/util.c +++ b/usr.sbin/bgpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.67 2022/06/22 14:49:02 tb Exp $ */ +/* $OpenBSD: util.c,v 1.68 2022/06/24 10:36:53 claudio Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -68,7 +68,7 @@ log_in6addr(const struct in6_addr *addr) /* XXX thanks, KAME, for this ugliness... adopted from route/show.c */ if ((IN6_IS_ADDR_LINKLOCAL(&sa_in6.sin6_addr) || IN6_IS_ADDR_MC_LINKLOCAL(&sa_in6.sin6_addr) || - IN6_IS_ADDR_MC_INTFACELOCAL(&sa_in6.sin6_addr)) && + IN6_IS_ADDR_MC_NODELOCAL(&sa_in6.sin6_addr)) && sa_in6.sin6_scope_id == 0) { uint16_t tmp16; memcpy(&tmp16, &sa_in6.sin6_addr.s6_addr[2], sizeof(tmp16)); @@ -922,7 +922,7 @@ sa2addr(struct sockaddr *sa, struct bgpd_addr *addr, uint16_t *port) */ if ((IN6_IS_ADDR_LINKLOCAL(&sa_in6->sin6_addr) || IN6_IS_ADDR_MC_LINKLOCAL(&sa_in6->sin6_addr) || - IN6_IS_ADDR_MC_INTFACELOCAL(&sa_in6->sin6_addr)) && + IN6_IS_ADDR_MC_NODELOCAL(&sa_in6->sin6_addr)) && sa_in6->sin6_scope_id == 0) { uint16_t tmp16; memcpy(&tmp16, &sa_in6->sin6_addr.s6_addr[2], |