mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Display next-hop MTU instead of encapsulated total IP len. http://seclists.org/nmap-dev/2016/q1/112
This commit is contained in:
parent
c2c86cb9f9
commit
1cde9a4ed7
2 changed files with 5 additions and 3 deletions
|
|
@ -1,5 +1,9 @@
|
|||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o Properly display Next-hop MTU value from ICMP Type 3 Code 4 Fragmentation
|
||||
Required messages when tracing packets or in Nping output. Improper offset
|
||||
meant we were printing the total IP length. [Sławomir Demeszko]
|
||||
|
||||
o [NSE] Added support for DHCP options "TFTP server name" and "Bootfile name"
|
||||
to dhcp.lua and enabled checking for options with a code above 61 by default.
|
||||
[Mike Rykowski]
|
||||
|
|
|
|||
|
|
@ -2683,7 +2683,6 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) {
|
|||
} else if (hdr.proto == IPPROTO_ICMP) {
|
||||
struct ip *ip2; /* Points to the IP datagram carried by some ICMP messages */
|
||||
char *ip2dst; /* Dest IP in caried IP datagram */
|
||||
u16 *nextmtu = NULL; /* Store next hop MTU when ICMP==Frag required */
|
||||
char auxbuff[128]; /* Aux buffer */
|
||||
struct icmp_packet{ /* Generic ICMP struct */
|
||||
u8 type;
|
||||
|
|
@ -2826,8 +2825,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) {
|
|||
|
||||
case 4:
|
||||
strcpy(icmptype, "Fragmentation required");
|
||||
nextmtu = (u16 *)(&(icmppkt->data[6]));
|
||||
Snprintf(icmpfields, sizeof(icmpfields), "Next-Hop-MTU=%hu", (unsigned short) ntohs(*nextmtu));
|
||||
Snprintf(icmpfields, sizeof(icmpfields), "Next-Hop-MTU=%hu", icmppkt->data[2]<<8 | icmppkt->data[3]);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue