Skip to content

Commit 901b801

Browse files
committed
ICMPv6: Fix duplicate type printing for Node Information Queries
Delete some duplicate macros, keeping macros with names similar to the RFC 4620 names. Update the outputs of two tests.
1 parent 434d67a commit 901b801

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

print-icmp6.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,7 @@ struct icmp6_hdr {
115115

116116
#define ICMP6_ROUTER_RENUMBERING 138 /* router renumbering */
117117

118-
#define ICMP6_WRUREQUEST 139 /* who are you request */
119-
#define ICMP6_WRUREPLY 140 /* who are you reply */
120-
#define ICMP6_FQDN_QUERY 139 /* FQDN query */
121-
#define ICMP6_FQDN_REPLY 140 /* FQDN reply */
122-
#define ICMP6_NI_QUERY 139 /* node information request - RFC 4620 */
118+
#define ICMP6_NI_QUERY 139 /* node information query - RFC 4620 */
123119
#define ICMP6_NI_REPLY 140 /* node information reply - RFC 4620 */
124120
#define IND_SOLICIT 141 /* inverse neighbor solicitation */
125121
#define IND_ADVERT 142 /* inverse neighbor advertisement */
@@ -661,8 +657,6 @@ static const struct tok icmp6_type_values[] = {
661657
{ ICMP6_HADISCOV_REPLY, "ha discovery reply"},
662658
{ ICMP6_MOBILEPREFIX_SOLICIT, "mobile router solicitation"},
663659
{ ICMP6_MOBILEPREFIX_ADVERT, "mobile router advertisement"},
664-
{ ICMP6_WRUREQUEST, "who-are-you request"},
665-
{ ICMP6_WRUREPLY, "who-are-you reply"},
666660
{ ICMP6_NI_QUERY, "node information query"},
667661
{ ICMP6_NI_REPLY, "node information reply"},
668662
{ MLD6_MTRACE, "mtrace message"},
@@ -1712,7 +1706,6 @@ icmp6_nodeinfo_print(netdissect_options *ndo, u_int icmp6len, const u_char *bp,
17121706
ND_PRINT(" who-are-you request");
17131707
break;
17141708
}
1715-
ND_PRINT(" node information query");
17161709

17171710
ND_TCHECK_LEN(dp, sizeof(*ni6));
17181711
ni6 = (const struct icmp6_nodeinfo *)dp;
@@ -1824,7 +1817,6 @@ icmp6_nodeinfo_print(netdissect_options *ndo, u_int icmp6len, const u_char *bp,
18241817

18251818
ND_TCHECK_LEN(dp, sizeof(*ni6));
18261819
ni6 = (const struct icmp6_nodeinfo *)dp;
1827-
ND_PRINT(" node information reply");
18281820
ND_PRINT(" ("); /*)*/
18291821
switch (GET_U_1(ni6->ni_code)) {
18301822
case ICMP6_NI_SUCCESS:

tests/icmp6_nodeinfo_oobr.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1 2014-11-10 03:32:08.002213 IP6 a072:7f00:1:7f00:1:e01a:17:6785 > c903::a002:8018:fe30:0:204: ICMP6, who-are-you reply [|icmp6], length 4
1+
1 2014-11-10 03:32:08.002213 IP6 a072:7f00:1:7f00:1:e01a:17:6785 > c903::a002:8018:fe30:0:204: ICMP6, node information reply [|icmp6], length 4

tests/icmpv6-ni-flags.out

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
1 2022-09-06 13:56:00.443595 IP6 fe80::5054:ff:fe43:2ca8 > fe80::5054:ff:fe2c:3629: ICMP6, who-are-you request node information query (node addresses [A], subject=fe80::5054:ff:fe2c:3629), length 32
2-
2 2022-09-06 13:56:46.614177 IP6 fe80::5054:ff:fe43:2ca8 > fe80::5054:ff:fe2c:3629: ICMP6, who-are-you request node information query (node addresses [C], subject=fe80::5054:ff:fe2c:3629), length 32
3-
3 2022-09-06 13:57:14.854456 IP6 fe80::5054:ff:fe43:2ca8 > fe80::5054:ff:fe2c:3629: ICMP6, who-are-you request node information query (node addresses [L], subject=fe80::5054:ff:fe2c:3629), length 32
4-
4 2022-09-06 13:57:22.010951 IP6 fe80::5054:ff:fe43:2ca8 > fe80::5054:ff:fe2c:3629: ICMP6, who-are-you request node information query (node addresses [S], subject=fe80::5054:ff:fe2c:3629), length 32
5-
5 2022-09-06 13:57:41.727114 IP6 fe80::5054:ff:fe43:2ca8 > fe80::5054:ff:fe2c:3629: ICMP6, who-are-you request node information query (node addresses [G], subject=fe80::5054:ff:fe2c:3629), length 32
1+
1 2022-09-06 13:56:00.443595 IP6 fe80::5054:ff:fe43:2ca8 > fe80::5054:ff:fe2c:3629: ICMP6, node information query (node addresses [A], subject=fe80::5054:ff:fe2c:3629), length 32
2+
2 2022-09-06 13:56:46.614177 IP6 fe80::5054:ff:fe43:2ca8 > fe80::5054:ff:fe2c:3629: ICMP6, node information query (node addresses [C], subject=fe80::5054:ff:fe2c:3629), length 32
3+
3 2022-09-06 13:57:14.854456 IP6 fe80::5054:ff:fe43:2ca8 > fe80::5054:ff:fe2c:3629: ICMP6, node information query (node addresses [L], subject=fe80::5054:ff:fe2c:3629), length 32
4+
4 2022-09-06 13:57:22.010951 IP6 fe80::5054:ff:fe43:2ca8 > fe80::5054:ff:fe2c:3629: ICMP6, node information query (node addresses [S], subject=fe80::5054:ff:fe2c:3629), length 32
5+
5 2022-09-06 13:57:41.727114 IP6 fe80::5054:ff:fe43:2ca8 > fe80::5054:ff:fe2c:3629: ICMP6, node information query (node addresses [G], subject=fe80::5054:ff:fe2c:3629), length 32

0 commit comments

Comments
 (0)