diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2022-02-25 22:54:35 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-02-25 22:54:35 +0100 |
commit | eed6933e6c29b131955c599bf54c4c4c3367491d (patch) | |
tree | 02b74e5e918e645f3a928b2a1fc857de719bd54f | |
parent | 9b61bd0b392ea1af6717d03e20dcc418ba73f575 (diff) | |
download | passt-eed6933e6c29b131955c599bf54c4c4c3367491d.tar passt-eed6933e6c29b131955c599bf54c4c4c3367491d.tar.gz passt-eed6933e6c29b131955c599bf54c4c4c3367491d.tar.bz2 passt-eed6933e6c29b131955c599bf54c4c4c3367491d.tar.lz passt-eed6933e6c29b131955c599bf54c4c4c3367491d.tar.xz passt-eed6933e6c29b131955c599bf54c4c4c3367491d.tar.zst passt-eed6933e6c29b131955c599bf54c4c4c3367491d.zip |
udp: Explicitly initialise sin6_scope_id and sin_zero in sockaddr_in{,6}
Not functionally needed, but gcc versions 7 to 9 (at least) will
issue a warning otherwise.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | udp.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -640,6 +640,7 @@ static void udp_sock_handler_splice(struct ctx *c, union epoll_ref ref, .sin6_family = AF_INET6, .sin6_addr = IN6ADDR_LOOPBACK_INIT, .sin6_port = htons(send_dst), + .sin6_scope_id = 0, }); } else { *((struct sockaddr_in *)&udp_splice_namebuf) = @@ -647,6 +648,7 @@ static void udp_sock_handler_splice(struct ctx *c, union epoll_ref ref, .sin_family = AF_INET, .sin_addr = { .s_addr = htonl(INADDR_LOOPBACK) }, .sin_port = htons(send_dst), + .sin_zero = { 0 }, }); } |