@@ -383,10 +383,9 @@ struct icmp6_nodeinfo {
383383#define ni_qtype icmp6_ni_hdr.icmp6_data16[0]
384384#define ni_flags icmp6_ni_hdr.icmp6_data16[1]
385385
386- #define NI_QTYPE_NOOP 0 /* NOOP */
387- #define NI_QTYPE_SUPTYPES 1 /* Supported Qtypes (drafts up to 09) */
388- #define NI_QTYPE_FQDN 2 /* FQDN (draft 04) */
389- #define NI_QTYPE_DNSNAME 2 /* DNS Name */
386+ #define NI_QTYPE_NOOP 0 /* NOOP */
387+ #define NI_QTYPE_SUPTYPES 1 /* Supported Qtypes (Obsolete) */
388+ #define NI_QTYPE_NODENAME 2 /* Node Name */
390389#define NI_QTYPE_NODEADDR 3 /* Node Addresses */
391390#define NI_QTYPE_IPV4ADDR 4 /* IPv4 Addresses */
392391
@@ -1714,14 +1713,8 @@ icmp6_nodeinfo_print(netdissect_options *ndo, u_int icmp6len, const u_char *bp,
17141713 case NI_QTYPE_NOOP :
17151714 ND_PRINT ("noop" );
17161715 break ;
1717- case NI_QTYPE_SUPTYPES :
1718- ND_PRINT ("supported qtypes" );
1719- i = GET_BE_U_2 (ni6 -> ni_flags );
1720- if (i )
1721- ND_PRINT (" [%s]" , (i & 0x01 ) ? "C" : "" );
1722- break ;
1723- case NI_QTYPE_FQDN :
1724- ND_PRINT ("DNS name" );
1716+ case NI_QTYPE_NODENAME :
1717+ ND_PRINT ("node name" );
17251718 break ;
17261719 case NI_QTYPE_NODEADDR :
17271720 ND_PRINT ("node addresses" );
@@ -1742,8 +1735,7 @@ icmp6_nodeinfo_print(netdissect_options *ndo, u_int icmp6len, const u_char *bp,
17421735 break ;
17431736 }
17441737
1745- if (GET_BE_U_2 (ni6 -> ni_qtype ) == NI_QTYPE_NOOP ||
1746- GET_BE_U_2 (ni6 -> ni_qtype ) == NI_QTYPE_SUPTYPES ) {
1738+ if (GET_BE_U_2 (ni6 -> ni_qtype ) == NI_QTYPE_NOOP ) {
17471739 if (siz != sizeof (* ni6 ))
17481740 if (ndo -> ndo_vflag )
17491741 ND_PRINT (", invalid len" );
@@ -1752,14 +1744,6 @@ icmp6_nodeinfo_print(netdissect_options *ndo, u_int icmp6len, const u_char *bp,
17521744 break ;
17531745 }
17541746
1755- /* XXX backward compat, icmp-name-lookup-03 */
1756- if (siz == sizeof (* ni6 )) {
1757- ND_PRINT (", 03 draft" );
1758- /*(*/
1759- ND_PRINT (")" );
1760- break ;
1761- }
1762-
17631747 cp = (const u_char * )(ni6 + 1 );
17641748 switch (GET_U_1 (ni6 -> ni_code )) {
17651749 case ICMP6_NI_SUBJ_IPV6 :
@@ -1775,19 +1759,7 @@ icmp6_nodeinfo_print(netdissect_options *ndo, u_int icmp6len, const u_char *bp,
17751759 break ;
17761760 case ICMP6_NI_SUBJ_FQDN :
17771761 ND_PRINT (", subject=DNS name" );
1778- if (GET_U_1 (cp ) == ep - cp - 1 ) {
1779- /* icmp-name-lookup-03, pascal string */
1780- if (ndo -> ndo_vflag )
1781- ND_PRINT (", 03 draft" );
1782- cp ++ ;
1783- ND_PRINT (", \"" );
1784- while (cp < ep ) {
1785- fn_print_char (ndo , GET_U_1 (cp ));
1786- cp ++ ;
1787- }
1788- ND_PRINT ("\"" );
1789- } else
1790- dnsname_print (ndo , cp , ep );
1762+ dnsname_print (ndo , cp , ep );
17911763 break ;
17921764 case ICMP6_NI_SUBJ_IPV4 :
17931765 if (!ND_TTEST_LEN (dp , sizeof (* ni6 ) + sizeof (nd_ipv4 )))
@@ -1856,32 +1828,12 @@ icmp6_nodeinfo_print(netdissect_options *ndo, u_int icmp6len, const u_char *bp,
18561828 if (ndo -> ndo_vflag )
18571829 ND_PRINT (", invalid length" );
18581830 break ;
1859- case NI_QTYPE_SUPTYPES :
1860- if (needcomma )
1861- ND_PRINT (", " );
1862- ND_PRINT ("supported qtypes" );
1863- i = GET_BE_U_2 (ni6 -> ni_flags );
1864- if (i )
1865- ND_PRINT (" [%s]" , (i & 0x01 ) ? "C" : "" );
1866- break ;
1867- case NI_QTYPE_FQDN :
1831+ case NI_QTYPE_NODENAME :
18681832 if (needcomma )
18691833 ND_PRINT (", " );
1870- ND_PRINT ("DNS name" );
1834+ ND_PRINT ("node name" );
18711835 cp = (const u_char * )(ni6 + 1 ) + 4 ;
1872- if (GET_U_1 (cp ) == ep - cp - 1 ) {
1873- /* icmp-name-lookup-03, pascal string */
1874- if (ndo -> ndo_vflag )
1875- ND_PRINT (", 03 draft" );
1876- cp ++ ;
1877- ND_PRINT (", \"" );
1878- while (cp < ep ) {
1879- fn_print_char (ndo , GET_U_1 (cp ));
1880- cp ++ ;
1881- }
1882- ND_PRINT ("\"" );
1883- } else
1884- dnsname_print (ndo , cp , ep );
1836+ dnsname_print (ndo , cp , ep );
18851837 if ((GET_BE_U_2 (ni6 -> ni_flags ) & 0x01 ) != 0 )
18861838 ND_PRINT (" [TTL=%u]" , GET_BE_U_4 (ni6 + 1 ));
18871839 break ;
0 commit comments