On Tue, May 30, 2017 at 10:21:17AM +0200, Michal Mazurek wrote:
> On 12:15:06, 29.05.17, Job Snijders wrote:
> > perhaps add a comment like /* RFC 6608 */ above the below:
> 
> Right, it will make it more consistent.
> 
> > > +static const char *bgpnotify_minor_fsm[] = {
> > > + NULL, "In OpenSent State", "In OpenConfirm State",
> > > + "In Established State",
> > > +};
> > 
> > and maybe s/NULL/"Unspecified Error"/
> 
> If it's NULL, then tcpdump will print out the number:
>
>       if (p == NULL) {
>               snprintf(buf, sizeof(buf), "#%d", minor);

Perhaps there is a misunderstanding on your part or on my part.

In the registry created by RFC 6608, the value "0" is the BGP Finite
State Machine Error subcode meaning "Unspecified Error". I think that
when a name is assigned to a value, the name should be printed (like
your patch does for subcode values 1, 2, and 3).

If no name is known for the error subcode, just printing the number is
useful indeed.

Kind regards,

Job

Reply via email to