summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2011-07-29 11:18:31 -0700
committerSam Roberts <vieuxtech@gmail.com>2011-07-29 11:18:31 -0700
commitdbedee5dda0ea66e975360aaf020a3ce996e2be0 (patch)
tree7f2014c3ded4e9c65ba8822cb0dd5945d889fd5d
parent57fd347762839354bacb02cb0e4275bf10cb01e6 (diff)
parent0e27fc96951d5a131278a17c88786ce067c3437f (diff)
downloadlibnet-dbedee5dda0ea66e975360aaf020a3ce996e2be0.tar.gz
Merge pull request #9 from allfro/patch-3
Fixes incorrect memory block size set in the timeexceed & redirect builder
-rw-r--r--libnet/src/libnet_build_icmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libnet/src/libnet_build_icmp.c b/libnet/src/libnet_build_icmp.c
index 7233b3e..d46590f 100644
--- a/libnet/src/libnet_build_icmp.c
+++ b/libnet/src/libnet_build_icmp.c
@@ -313,7 +313,7 @@ const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
}
/* size of memory block */
- n = LIBNET_ICMPV4_TIMXCEED_H;
+ n = LIBNET_ICMPV4_TIMXCEED_H + payload_s;
/*
* FREDRAYNAL: as ICMP checksum includes what is embedded in
* the payload, and what is after the ICMP header, we need to include
@@ -362,7 +362,7 @@ libnet_ptag_t ptag)
return (-1);
}
- n = LIBNET_ICMPV4_REDIRECT_H; /* size of memory block */
+ n = LIBNET_ICMPV4_REDIRECT_H + payload_s; /* size of memory block */
/*
* FREDRAYNAL: as ICMP checksum includes what is embedded in
* the payload, and what is after the ICMP header, we need to include