diff options
author | Renato Westphal <renato@cvs.openbsd.org> | 2016-06-27 19:18:55 +0000 |
---|---|---|
committer | Renato Westphal <renato@cvs.openbsd.org> | 2016-06-27 19:18:55 +0000 |
commit | 71e4495190aa39a98f8f101bd2adfd5efdcd90fe (patch) | |
tree | 11cd7b03ca9104222118b18eef0a0ff7938f1622 /usr.sbin | |
parent | 43e62d40ade36d6fe1b4c60b292860cbccb59620 (diff) |
Fix inverted logic in recv_hello().
Bug introduced by rev1.48 two weeks ago. We were not respecting the
advertised transport connection preference (LDPoIPv4 or LDPoIPv6),
the fix is pretty obvious.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ldpd/hello.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ldpd/hello.c b/usr.sbin/ldpd/hello.c index e9c6da1cb60..5eb82617733 100644 --- a/usr.sbin/ldpd/hello.c +++ b/usr.sbin/ldpd/hello.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hello.c,v 1.51 2016/06/27 19:06:33 renato Exp $ */ +/* $OpenBSD: hello.c,v 1.52 2016/06/27 19:18:54 renato Exp $ */ /* * Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org> @@ -359,8 +359,8 @@ recv_hello(struct in_addr lsr_id, struct ldp_msg *lm, int af, * to start an LDP session. */ if (nbr == NULL && (!ds_tlv || - ((trans_pref == DUAL_STACK_LDPOV4 && af != AF_INET) || - (trans_pref == DUAL_STACK_LDPOV6 && af != AF_INET6)))) + ((trans_pref == DUAL_STACK_LDPOV4 && af == AF_INET) || + (trans_pref == DUAL_STACK_LDPOV6 && af == AF_INET6)))) nbr = nbr_new(lsr_id, af, ds_tlv, &trans_addr, scope_id); /* update neighbor's configuration sequence number */ |