From 6f96649d1b6ade7e4730a3b3d0f479c33fd4d764 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Wed, 8 Feb 2017 07:42:08 +0100 Subject: BFD: minor fixes Change-Id: I1c93f96a752eb2ffd1117a656552131cde1fa489 Signed-off-by: Klement Sekera --- src/vnet/bfd/bfd_main.c | 2 +- src/vnet/bfd/bfd_udp.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/vnet/bfd/bfd_main.c b/src/vnet/bfd/bfd_main.c index 798d0631..0c5f1986 100644 --- a/src/vnet/bfd/bfd_main.c +++ b/src/vnet/bfd/bfd_main.c @@ -526,8 +526,8 @@ bfd_add_sha1_auth_section (vlib_buffer_t * b, bfd_session_t * bs) SHA1 ((unsigned char *) pkt, sizeof (*pkt), hash); BFD_DBG ("hashing: %U", format_hex_bytes, pkt, sizeof (*pkt)); clib_memcpy (auth->hash, hash, sizeof (hash)); -#endif } +#endif static void bfd_add_auth_section (vlib_buffer_t * b, bfd_session_t * bs) diff --git a/src/vnet/bfd/bfd_udp.c b/src/vnet/bfd/bfd_udp.c index e21b887c..e1ff8a9d 100644 --- a/src/vnet/bfd/bfd_udp.c +++ b/src/vnet/bfd/bfd_udp.c @@ -637,8 +637,7 @@ bfd_udp4_verify_transport (const ip4_header_t * ip4, expected_ttl); return BFD_UDP_ERROR_BAD; } - if (clib_net_to_host_u16 (udp->src_port) < 49152 || - clib_net_to_host_u16 (udp->src_port) > 65535) + if (clib_net_to_host_u16 (udp->src_port) < 49152) { BFD_ERR ("Invalid UDP src port %u, out of range <49152,65535>", udp->src_port); @@ -805,8 +804,7 @@ bfd_udp6_verify_transport (const ip6_header_t * ip6, ip6->hop_limit, expected_hop_limit); return BFD_UDP_ERROR_BAD; } - if (clib_net_to_host_u16 (udp->src_port) < 49152 || - clib_net_to_host_u16 (udp->src_port) > 65535) + if (clib_net_to_host_u16 (udp->src_port) < 49152) { BFD_ERR ("Invalid UDP src port %u, out of range <49152,65535>", udp->src_port); -- cgit 1.2.3-korg