summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2019-12-19 18:48:11 +0000
committerThomas Habets <thomas@habets.se>2019-12-19 18:49:30 +0000
commit9e292067f7501cc5001e2c659c4cd88e79cceec2 (patch)
tree1ab33bb171d72b84ee07199eb632f2c433d7ed21
parent75b5cdd16d471a0ec2d2b15d6e475b850340e0d6 (diff)
downloadarping-9e292067f7501cc5001e2c659c4cd88e79cceec2.tar.gz
Set length in IPv4 header to include padding
-rw-r--r--src/arping.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arping.c b/src/arping.c
index aae839c..5973d36 100644
--- a/src/arping.c
+++ b/src/arping.c
@@ -993,7 +993,8 @@ pingmac_send(uint16_t id, uint16_t seq)
}
if (-1==(ipv4 = libnet_build_ipv4(LIBNET_IPV4_H
- + LIBNET_ICMPV4_ECHO_H + 0,
+ + LIBNET_ICMPV4_ECHO_H
+ + sizeof padding,
0, /* ToS */
id, /* id */
0, /* frag */