Module Name: src
Committed By: kefren
Date: Tue Nov 13 06:58:59 UTC 2012
Modified Files:
src/usr.sbin/ldpd: socketops.c
Log Message:
Use local-link address as source for hellos
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/ldpd/socketops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/ldpd/socketops.c
diff -u src/usr.sbin/ldpd/socketops.c:1.14 src/usr.sbin/ldpd/socketops.c:1.15
--- src/usr.sbin/ldpd/socketops.c:1.14 Tue Nov 13 01:08:51 2012
+++ src/usr.sbin/ldpd/socketops.c Tue Nov 13 06:58:58 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: socketops.c,v 1.14 2012/11/13 01:08:51 pgoyette Exp $ */
+/* $NetBSD: socketops.c,v 1.15 2012/11/13 06:58:58 kefren Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -468,6 +468,14 @@ send_hello(void)
continue;
if (IN6_IS_ADDR_LOOPBACK(&if_sa6->sin6_addr))
continue;
+ /*
+ * draft-ietf-mpls-ldp-ipv6-07 Section 5.1:
+ * Additionally, the link-local
+ * IPv6 address MUST be used as the source IP address in IPv6
+ * LDP Link Hellos.
+ */
+ if (IN6_IS_ADDR_LINKLOCAL(&if_sa6->sin6_addr) == 0)
+ continue;
/* Send only once per interface, using primary address */
if (strcmp(ifb->ifa_name, lastifname) == 0)