summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ldpd/hello.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2011-01-10 12:28:25 +0000
committerclaudio <claudio@openbsd.org>2011-01-10 12:28:25 +0000
commit0c4684a8edaa3dc29f0ca2b117d173f93faf4522 (patch)
treec735f9f67a9d40e3351f818ef81e2911d63d0e97 /usr.sbin/ldpd/hello.c
parentMake sure the tlv length is exactly the size we expect. (diff)
downloadwireguard-openbsd-0c4684a8edaa3dc29f0ca2b117d173f93faf4522.tar.xz
wireguard-openbsd-0c4684a8edaa3dc29f0ca2b117d173f93faf4522.zip
Fix a bad heritage from ospfd. Make neighbors independent of interfaces.
They are not bound as strongly as in ospf and causes problems when the TCP connection is established from an not connected IP (e.g. a loopback). Use three RB trees to sort the neighbor list by id, addr and peerid. More cleanup is needed but this makes ldpd work against peers using loopback IPs. Problem found, reported and fix tested again by Marcel Wiget.
Diffstat (limited to 'usr.sbin/ldpd/hello.c')
-rw-r--r--usr.sbin/ldpd/hello.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ldpd/hello.c b/usr.sbin/ldpd/hello.c
index 3511caa622a..e921c364079 100644
--- a/usr.sbin/ldpd/hello.c
+++ b/usr.sbin/ldpd/hello.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hello.c,v 1.10 2011/01/10 12:05:22 claudio Exp $ */
+/* $OpenBSD: hello.c,v 1.11 2011/01/10 12:28:25 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -122,7 +122,7 @@ recv_hello(struct iface *iface, struct in_addr src, char *buf, u_int16_t len)
return;
}
- nbr = nbr_find_ldpid(iface, ldp.lsr_id, ldp.lspace_id);
+ nbr = nbr_find_ldpid(ldp.lsr_id, ldp.lspace_id);
if (!nbr) {
nbr = nbr_new(ldp.lsr_id, ldp.lspace_id, iface);