Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: 'off by one' in tcpdump afnum list
To:
Denis Fondras <denis@openbsd.org>
Cc:
tech@openbsd.org
Date:
Sun, 15 Dec 2024 21:48:32 +0100

Download raw body.

Thread
On Sun, Dec 15, 2024 at 08:57:20PM +0100, Denis Fondras wrote:
> I was trying to add an address family number, could not make it work before I
> noticed we missed an AF description in the list.

This must be a strong contender for "most error-prone way of handling
this"... C99 initializers might be a step in the right direction or
better yet a function in util.c. Also note that lldp_print() won't be
ever print "GWID" (not sure this is a practical problem, but it looks
like a bug).

ok tb

> 
> Index: afnum.h
> ===================================================================
> RCS file: /cvs/src/usr.sbin/tcpdump/afnum.h,v
> diff -u -p -r1.1 afnum.h
> --- afnum.h	28 Mar 2006 15:48:33 -0000	1.1
> +++ afnum.h	15 Dec 2024 19:54:04 -0000
> @@ -68,6 +68,7 @@
>  	"Banyan Vines",							\
>  	"E.164 with NSAP subaddress",					\
>  	"DNS",								\
> +	"Distinguished Name",						\
>  	"AS Number",							\
>  	"XTP over IPv4",						\
>  	"XTP over IPv6",						\
>