Module Name: src Committed By: kre Date: Tue Dec 19 17:05:15 UTC 2017
Modified Files: src/usr.bin/netstat: inet6.c Log Message: Add names of a few more ICMPv6 messages, from RFC6275 (Mobile IPv6) and RFC4286 (Multicast Router Discovery.) and as shown in the IANA parameters page available at: https://www.ietf.org/assignments/icmpv6-parameters/icmpv6-parameters.txt Also make the array be explicitly 256 entries long, one for each possible code, which will detect attempts to insert names without deleting the place holder (and mean a good solid NULL de-ref if too many place holders are deleted, rather than just random results.) To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/usr.bin/netstat/inet6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/netstat/inet6.c diff -u src/usr.bin/netstat/inet6.c:1.69 src/usr.bin/netstat/inet6.c:1.70 --- src/usr.bin/netstat/inet6.c:1.69 Sat Dec 17 09:12:22 2016 +++ src/usr.bin/netstat/inet6.c Tue Dec 19 17:05:15 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: inet6.c,v 1.69 2016/12/17 09:12:22 mlelstv Exp $ */ +/* $NetBSD: inet6.c,v 1.70 2017/12/19 17:05:15 kre Exp $ */ /* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */ /* @@ -64,7 +64,7 @@ #if 0 static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94"; #else -__RCSID("$NetBSD: inet6.c,v 1.69 2016/12/17 09:12:22 mlelstv Exp $"); +__RCSID("$NetBSD: inet6.c,v 1.70 2017/12/19 17:05:15 kre Exp $"); #endif #endif /* not lint */ @@ -860,7 +860,7 @@ ip6_ifstats(const char *ifname) #undef p_5 } -static const char *icmp6names[] = { +static const char *icmp6names[256] = { "#0", "unreach", "packet too big", @@ -1004,17 +1004,17 @@ static const char *icmp6names[] = { "node information reply", "#141", "#142", - "#143", - "#144", - "#145", - "#146", - "#147", + "multicast listener report (v2)", + "home agent discovery request", + "home agent discovery reply", + "mobile prefix solicitation", + "mobile prefix advertisement", "#148", "#149", "#150", - "#151", - "#152", - "#153", + "multicast router advertisement", + "multicast router solicitation", + "multicast router termination", "#154", "#155", "#156",