From: renato Date: Mon, 27 Jun 2016 19:18:54 +0000 (+0000) Subject: Fix inverted logic in recv_hello(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8eeefd1d801ce96cf1dc58cf19ff4af34ecad043;p=openbsd 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. --- 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 */