[cmaster-next] [PATCH 02/10] ldpd: allow multiple link adjacencies with unnumbered interfaces

Renato Westphal renato at opensourcerouting.org
Thu Dec 15 09:55:46 EST 2016


Now we can have two different adjacencies coming from the same source
address. Check for the adjacency's interface on adj_find() to disambiguate
them.

Signed-off-by: Renato Westphal <renato at opensourcerouting.org>
---
 ldpd/adjacency.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ldpd/adjacency.c b/ldpd/adjacency.c
index 3607ee9..d1a6fac 100644
--- a/ldpd/adjacency.c
+++ b/ldpd/adjacency.c
@@ -117,6 +117,10 @@ adj_find(struct hello_source *source)
 
 		switch (source->type) {
 		case HELLO_LINK:
+			if (strcmp(source->link.ia->iface->name,
+			    adj->source.link.ia->iface->name))
+				continue;
+
 			if (ldp_addrcmp(source->link.ia->af,
 			    &adj->source.link.src_addr,
 			    &source->link.src_addr) == 0)
-- 
1.9.1





More information about the dev mailing list