summaryrefslogtreecommitdiff
path: root/ldpd/adjacency.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2016-12-14 19:20:10 -0200
committerRenato Westphal <renato@opensourcerouting.org>2016-12-21 19:33:37 -0200
commit9c0b0e6753b110a7e0ba4229873a6c10cd8c6bd5 (patch)
treecb69312d239b67522a67c35f8a171765f2978a5f /ldpd/adjacency.c
parent2f49a5942b3003023c51a0426725d9e440deccfa (diff)
ldpd: allow multiple link adjacencies with unnumbered interfaces
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@opensourcerouting.org>
Diffstat (limited to 'ldpd/adjacency.c')
-rw-r--r--ldpd/adjacency.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ldpd/adjacency.c b/ldpd/adjacency.c
index 3607ee96b3..d1a6facb30 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)