On Tue, May 30, 2017 at 11:50:57AM +0200, Michal Mazurek wrote:
> On 11:27:28, 30.05.17, Claudio Jeker wrote:
> > On a side note. The notification error code 7 seems to be wrong.
> > The capability error codes made it never into a standard and now 
> > error code 7 if for enhanced route refresh.
> > 
> > So I would replace bgpnotify_minor_cap with
> > static const char *bgpnotify_minor_err[] = {
> >     NULL, "Invalid Message Length",
> > };
> > 
> > See also
> > https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#route-refresh-error-subcodes
> 
> In that case let's correct it.

OK claudio@
 
> Index: usr.sbin/tcpdump/print-bgp.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/tcpdump/print-bgp.c,v
> retrieving revision 1.22
> diff -u -p -r1.22 print-bgp.c
> --- usr.sbin/tcpdump/print-bgp.c      30 May 2017 09:40:08 -0000      1.22
> +++ usr.sbin/tcpdump/print-bgp.c      30 May 2017 09:45:44 -0000
> @@ -249,15 +249,15 @@ static const char *bgpnotify_minor_cease
>       "Out of Resources",
>  };
>  
> -static const char *bgpnotify_minor_cap[] = {
> -     NULL, "Invalid Action Value", "Invalid Capability Length",
> -     "Malformed Capability Value", "Unsupported Capability Code",
> +/* RFC 7313 */
> +static const char *bgpnotify_minor_err[] = {
> +     NULL, "Invalid Message Length",
>  };
>  
>  static const char **bgpnotify_minor[] = {
>       NULL, bgpnotify_minor_msg, bgpnotify_minor_open, bgpnotify_minor_update,
>       bgpnotify_minor_holdtime, bgpnotify_minor_fsm, bgpnotify_minor_cease,
> -     bgpnotify_minor_cap,
> +     bgpnotify_minor_err,
>  };
>  static const int bgpnotify_minor_siz[] = {
>       0,
> @@ -267,7 +267,7 @@ static const int bgpnotify_minor_siz[] =
>       sizeof(bgpnotify_minor_holdtime)/sizeof(bgpnotify_minor_holdtime[0]),
>       sizeof(bgpnotify_minor_fsm)/sizeof(bgpnotify_minor_fsm[0]),
>       sizeof(bgpnotify_minor_cease)/sizeof(bgpnotify_minor_cease[0]),
> -     sizeof(bgpnotify_minor_cap)/sizeof(bgpnotify_minor_cap[0]),
> +     sizeof(bgpnotify_minor_err)/sizeof(bgpnotify_minor_err[0]),
>  };
>  
>  static const char *bgpattr_origin[] = {
> 
> -- 
> Michal Mazurek
> 

-- 
:wq Claudio

Reply via email to