]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bfdd: Use AF_UNSPEC instead of comparing to 0
authorDonald Sharp <sharpd@nvidia.com>
Mon, 7 Feb 2022 18:25:21 +0000 (13:25 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 7 Feb 2022 18:25:21 +0000 (13:25 -0500)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bfdd/ptm_adapter.c

index b0eb85e5f8371b495dd7ffecd01536e861091775..0e5f701fc2712d6d2d9ead25188fc4ae5dffb277 100644 (file)
@@ -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");