From 36af9da175cfa5e028890abcdfe0c7e4a9dd1757 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 14 Jun 2011 02:29:38 +0000 Subject: [PATCH] Make abstract_ip_hdr.ipid 16 bits, not 8. This was a mistake that was cauding later IP ID comparisons to be false because of truncation. In particular, it could make all protocols appear to be open when doing a -sO scan against localhost because the outgoing packets looked like protocol replies. --- libnetutil/netutil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnetutil/netutil.h b/libnetutil/netutil.h index 7606af65e..0e56a5229 100644 --- a/libnetutil/netutil.h +++ b/libnetutil/netutil.h @@ -122,7 +122,7 @@ struct abstract_ip_hdr { struct sockaddr_storage dst; u8 proto; /* IPv4 proto or IPv6 next header. */ u8 ttl; /* IPv4 TTL or IPv6 hop limit. */ - u8 ipid; /* IPv4 IP ID or IPv6 flow label. */ + u16 ipid; /* IPv4 IP ID or IPv6 flow label. */ }; void netutil_fatal(const char *str, ...)