diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-01-17 13:41:25 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-01-17 13:41:25 +0000 |
commit | 7e110db2c81fea82e2982e2e9aceac64ce2e78f2 (patch) | |
tree | 308d65b636bab5141c11717d5c62327675fa453d /usr.sbin/dhcrelay6 | |
parent | 0391f793f0bfca4220b91439862c496787348e27 (diff) |
Put the clearing of possible embedded scope in an __KAME__ block.
This code does not really need to be optional since for non embedded
scope link local addresses this is a NOP.
OK jca@
Diffstat (limited to 'usr.sbin/dhcrelay6')
-rw-r--r-- | usr.sbin/dhcrelay6/dispatch.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/dhcrelay6/dispatch.c b/usr.sbin/dhcrelay6/dispatch.c index 2c80cfc9688..06aba339e30 100644 --- a/usr.sbin/dhcrelay6/dispatch.c +++ b/usr.sbin/dhcrelay6/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.1 2017/03/17 14:45:16 rzalamena Exp $ */ +/* $OpenBSD: dispatch.c,v 1.2 2021/01/17 13:41:24 claudio Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -187,11 +187,16 @@ setup_iflist(void) intf->primary_address = sin->sin_addr; } else if (ifa->ifa_addr->sa_family == AF_INET6) { sin6 = (struct sockaddr_in6 *)ifa->ifa_addr; - /* Remove the scope from address if link-local. */ if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { intf->linklocal = sin6->sin6_addr; +#ifdef __KAME__ + /* + * Remove possible scope from address if + * link-local. + */ intf->linklocal.s6_addr[2] = 0; intf->linklocal.s6_addr[3] = 0; +#endif } else intf->gipv6 = 1; |