diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2009-03-30 17:57:41 -0700 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2009-03-30 17:57:41 -0700 |
commit | 2fe8da3a8e01ecc8697e529de5cbba5a502473b5 (patch) | |
tree | 62aa73970257b2ef653d414ef0939f8cf4882971 /libnet/src/libnet_build_ip.c | |
parent | 14f67cc09cf7c98a871a5e07d699a0d57b2d7747 (diff) | |
download | libnet-2fe8da3a8e01ecc8697e529de5cbba5a502473b5.tar.gz |
Fix for debian bug# 418975, IPv6 wasn't updating ip_offset.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=418975 and
sample test_ipv6_icmpv4.c for more information, and reproduction.
Diffstat (limited to 'libnet/src/libnet_build_ip.c')
-rw-r--r-- | libnet/src/libnet_build_ip.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libnet/src/libnet_build_ip.c b/libnet/src/libnet_build_ip.c index e0e760d..c23c296 100644 --- a/libnet/src/libnet_build_ip.c +++ b/libnet/src/libnet_build_ip.c @@ -557,8 +557,13 @@ u_int8_t *payload, u_int32_t payload_s, libnet_t *l, libnet_ptag_t ptag) } /* no checksum for IPv6 */ - return (ptag ? ptag : libnet_pblock_update(l, p, LIBNET_IPV6_H, - LIBNET_PBLOCK_IPV6_H)); + ptag = ptag ? ptag : libnet_pblock_update(l, p, LIBNET_IPV6_H, + LIBNET_PBLOCK_IPV6_H); + + libnet_pblock_record_ip_offset(l, p); + + return ptag; + bad: libnet_pblock_delete(l, p); return (-1); |