Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/ldpd Use local-link address as source for hellos



details:   https://anonhg.NetBSD.org/src/rev/af6199e5b609
branches:  trunk
changeset: 782662:af6199e5b609
user:      kefren <kefren%NetBSD.org@localhost>
date:      Tue Nov 13 06:58:58 2012 +0000

description:
Use local-link address as source for hellos

diffstat:

 usr.sbin/ldpd/socketops.c |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 3c7f0db738a5 -r af6199e5b609 usr.sbin/ldpd/socketops.c
--- a/usr.sbin/ldpd/socketops.c Tue Nov 13 01:08:51 2012 +0000
+++ b/usr.sbin/ldpd/socketops.c Tue Nov 13 06:58:58 2012 +0000
@@ -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 @@
                        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)



Home | Main Index | Thread Index | Old Index