Nmap Development mailing list archives
Fix for issue #3326
From: advait deshmukh <adv2823deshmukh () gmail com>
Date: Sun, 29 Mar 2026 10:44:27 +0530
Issue link <https://github.com/nmap/nmap/issues/3326> Pull request link <https://github.com/nmap/nmap/pull/3337> I read the source code and, from what I understood, the current output appears to be intentional. The ipv4 value being shown seems to refer to the next header, i.e., the protocol of the packet encapsulated within the outer packet, which in this case is IPv6. Since the user has explicitly specified -6 in the command, it seems reasonable to assume that the outgoing packets are expected to be in IPv6 format rather than IPv4. That said, I understand how this could lead to confusion. To improve clarity, I have added a fix in the else statement at line 3127 <https://github.com/Adv2924/nmap/blob/6dac43b5d892e5566f4d1d911573403e9f86bb96/libnetutil/netutil.cc#L3127> in libnetutil/netutil.cc, which checks whether hdr.version is set to 6 and updates the logging accordingly. While going through the code I also noticed that nmap tries to parse the packet it recognizes (it was ICMP in this case). So I wanted to ask if it will be helpful if we can parse other packets too (whichever are mentioned in the massive switch case in nexthdrtoa function in netutil.cc)? PS: I am completely new to open source contributing and this is my first pull request, so please don't mind me asking stupid questions.
_______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at https://seclists.org/nmap-dev/
Current thread:
- Fix for issue #3326 advait deshmukh (Apr 14)
