From: Ben Pfaff Date: Tue, 16 Jul 2013 17:06:27 +0000 (-0700) Subject: bfd: Use htonll() instead of htonl() for tunnel ID constant. X-Git-Tag: sliver-openvswitch-2.0.90-1~36^2~16 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=f645ee9cdd394eafd9f69c07ef4ad886b3a100cd bfd: Use htonll() instead of htonl() for tunnel ID constant. This is not a real bug, since htonl(0) and htonll(0) have the same value although not the same type. Found by sparse. CC: Pavithra Ramesh CC: Ethan Jackson Signed-off-by: Ben Pfaff --- diff --git a/lib/bfd.c b/lib/bfd.c index a06611a8f..3ac257a59 100644 --- a/lib/bfd.c +++ b/lib/bfd.c @@ -17,6 +17,7 @@ #include +#include "byte-order.h" #include "csum.h" #include "dpif.h" #include "dynamic-string.h" @@ -458,7 +459,7 @@ bfd_should_process_flow(const struct bfd *bfd, const struct flow *flow, return (flow->dl_type == htons(ETH_TYPE_IP) && flow->nw_proto == IPPROTO_UDP && flow->tp_dst == htons(3784) - && (!bfd->check_tnl_key || flow->tunnel.tun_id == htonl(0))); + && (!bfd->check_tnl_key || flow->tunnel.tun_id == htonll(0))); } void