From 8eeefd1d801ce96cf1dc58cf19ff4af34ecad043 Mon Sep 17 00:00:00 2001 From: renato Date: Mon, 27 Jun 2016 19:18:54 +0000 Subject: [PATCH] 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. --- usr.sbin/ldpd/hello.c | 6 +++--- 1 file 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 @@ -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 */ -- 2.20.1