diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2022-06-22 14:49:03 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2022-06-22 14:49:03 +0000 |
commit | 4f9054af1cb4dfe0f27134fcf779807520b22c49 (patch) | |
tree | 255bfe9179228c43aae29851c522c87cdec0372b | |
parent | 58be14f202d50e5bf3bca72a13345d55250c96f8 (diff) |
Sync KAME hack in log_in6addr() with route/show.c
ok claudio
-rw-r--r-- | usr.sbin/bgpd/util.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/util.c b/usr.sbin/bgpd/util.c index c84b502c00f..1c0c87b637b 100644 --- a/usr.sbin/bgpd/util.c +++ b/usr.sbin/bgpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.66 2022/06/19 10:30:10 claudio Exp $ */ +/* $OpenBSD: util.c,v 1.67 2022/06/22 14:49:02 tb Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -66,8 +66,10 @@ log_in6addr(const struct in6_addr *addr) #ifdef __KAME__ /* 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)) { + 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)) && + sa_in6.sin6_scope_id == 0) { uint16_t tmp16; memcpy(&tmp16, &sa_in6.sin6_addr.s6_addr[2], sizeof(tmp16)); sa_in6.sin6_scope_id = ntohs(tmp16); |