CAPWAP creates a UDP socket that accepts packets from any address using
INADDR_ANY. IP addresses should be in network byte order but that
constant is in host byte order, so use htonl. However, this is not a
real bug since the value of INADDR_ANY is 0.
Found with sparse.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
goto error;
sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = INADDR_ANY;
+ sin.sin_addr.s_addr = htonl(INADDR_ANY);
sin.sin_port = htons(CAPWAP_DST_PORT);
err = kernel_bind(capwap_rcv_socket, (struct sockaddr *)&sin,