From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 2/7] udp: Explicitly initialise sin6_scope_id and sin_zero in sockaddr_in{,6} Date: Sat, 26 Feb 2022 23:56:41 +0100 Message-ID: <20220226225646.1905417-3-sbrivio@redhat.com> In-Reply-To: <20220226225646.1905417-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3948406712176378579==" --===============3948406712176378579== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Not functionally needed, but gcc versions 7 to 9 (at least) will issue a warning otherwise. Signed-off-by: Stefano Brivio --- udp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udp.c b/udp.c index d4f3714..ccce005 100644 --- a/udp.c +++ b/udp.c @@ -640,6 +640,7 @@ static void udp_sock_handler_splice(struct ctx *c, union = epoll_ref ref, .sin6_family =3D AF_INET6, .sin6_addr =3D IN6ADDR_LOOPBACK_INIT, .sin6_port =3D htons(send_dst), + .sin6_scope_id =3D 0, }); } else { *((struct sockaddr_in *)&udp_splice_namebuf) =3D @@ -647,6 +648,7 @@ static void udp_sock_handler_splice(struct ctx *c, union = epoll_ref ref, .sin_family =3D AF_INET, .sin_addr =3D { .s_addr =3D htonl(INADDR_LOOPBACK) }, .sin_port =3D htons(send_dst), + .sin_zero =3D { 0 }, }); } =20 --=20 2.34.1 --===============3948406712176378579==--