From b6d2bb07d86e3e2799643e9ef828943378ab8429 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 7 Feb 2022 13:25:21 -0500 Subject: [PATCH] bfdd: Use AF_UNSPEC instead of comparing to 0 Signed-off-by: Donald Sharp --- bfdd/ptm_adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bfdd/ptm_adapter.c b/bfdd/ptm_adapter.c index b0eb85e5f8..0e5f701fc2 100644 --- a/bfdd/ptm_adapter.c +++ b/bfdd/ptm_adapter.c @@ -457,7 +457,7 @@ static int _ptm_msg_read(struct stream *msg, int command, vrf_id_t vrf_id, } /* Sanity check: peer and local address must match IP types. */ - if (bpc->bpc_local.sa_sin.sin_family != 0 + if (bpc->bpc_local.sa_sin.sin_family != AF_UNSPEC && (bpc->bpc_local.sa_sin.sin_family != bpc->bpc_peer.sa_sin.sin_family)) { zlog_warn("ptm-read: peer family doesn't match local type");