summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-02-21 18:39:09 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-02-21 18:39:09 +0000
commitf4c6311041d081cbad530ba0928005dd32ef7341 (patch)
treec82cd8d6bdfa9e9f40e64117fee87fedbea32861
parent1cbfe68ea7152e4613f97d7fe87368802a2a0837 (diff)
Add scope id only for unicast IPv6 packets.
-rw-r--r--usr.sbin/eigrpd/packet.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/eigrpd/packet.c b/usr.sbin/eigrpd/packet.c
index 58c7220f68e..2db339bd1c1 100644
--- a/usr.sbin/eigrpd/packet.c
+++ b/usr.sbin/eigrpd/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.8 2016/01/15 12:43:02 renato Exp $ */
+/* $OpenBSD: packet.c,v 1.9 2016/02/21 18:39:08 renato Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -124,11 +124,11 @@ send_packet_v6(struct iface *iface, struct nbr *nbr, struct ibuf *buf)
memset(&sa6, 0, sizeof(sa6));
sa6.sin6_family = AF_INET6;
sa6.sin6_len = sizeof(struct sockaddr_in6);
- if (nbr)
+ if (nbr) {
sa6.sin6_addr = nbr->addr.v6;
- else
+ addscope(&sa6, iface->ifindex);
+ } else
memcpy(&sa6.sin6_addr, &maddr, sizeof(sa6.sin6_addr));
- addscope(&sa6, iface->ifindex);
/* set outgoing interface for multicast traffic */
if (IN6_IS_ADDR_MULTICAST(&sa6.sin6_addr))