aboutgitcodebugslistschat
path: root/icmp.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-01-16 16:16:09 +1100
committerStefano Brivio <sbrivio@redhat.com>2024-01-22 23:36:35 +0100
commit2cb2fe6f89152e537ee583c6f74397a42aae11a9 (patch)
tree962b531f2307cb043add1553376c1318b160e593 /icmp.c
parent5dffb998925376440aa09ac48523b86fa96381ee (diff)
downloadpasst-2cb2fe6f89152e537ee583c6f74397a42aae11a9.tar
passt-2cb2fe6f89152e537ee583c6f74397a42aae11a9.tar.gz
passt-2cb2fe6f89152e537ee583c6f74397a42aae11a9.tar.bz2
passt-2cb2fe6f89152e537ee583c6f74397a42aae11a9.tar.lz
passt-2cb2fe6f89152e537ee583c6f74397a42aae11a9.tar.xz
passt-2cb2fe6f89152e537ee583c6f74397a42aae11a9.tar.zst
passt-2cb2fe6f89152e537ee583c6f74397a42aae11a9.zip
icmp: Remove redundant initialisation of sendto() address
We initialise the address portion of the sockaddr for sendto() to the unspecified address, but then always overwrite it with the actual destination address before we call the sendto(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'icmp.c')
-rw-r--r--icmp.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/icmp.c b/icmp.c
index ca039f0..ed1a3d9 100644
--- a/icmp.c
+++ b/icmp.c
@@ -169,7 +169,6 @@ int icmp_tap_handler(const struct ctx *c, uint8_t pif, int af,
if (af == AF_INET) {
struct sockaddr_in sa = {
.sin_family = AF_INET,
- .sin_addr = IN4ADDR_ANY_INIT,
};
union icmp_epoll_ref iref;
const struct icmphdr *ih;
@@ -213,7 +212,6 @@ int icmp_tap_handler(const struct ctx *c, uint8_t pif, int af,
} else if (af == AF_INET6) {
struct sockaddr_in6 sa = {
.sin6_family = AF_INET6,
- .sin6_addr = IN6ADDR_ANY_INIT,
.sin6_scope_id = c->ifi6,
};
union icmp_epoll_ref iref;