On Fri, Sep 21, 2018 at 08:47:31AM +0200, Denis Fondras wrote:
> On Fri, Sep 21, 2018 at 07:20:24AM +0200, Claudio Jeker wrote:
> > Similar to AS_TRANS (23456) AS 0 should not be allowed.
> > This adds this restriction for asnumbers which are used on AS, remote-as
> > and local-as tokens in the config. Inside filters as4numer_any is used
> > which does not have any kind of restriction.
> > 
> > OK?
> 
> Error message does not really match.

Good point it should use what people put in there. Was lurd into the trap
by the %u in the string and forgot to double check the argument. Will fix
that before commit.
 
> Otherwise OK denis@
> 
> > -- 
> > :wq Claudio
> > 
> > 
> > ? obj
> > Index: parse.y
> > ===================================================================
> > RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v
> > retrieving revision 1.357
> > diff -u -p -r1.357 parse.y
> > --- parse.y 21 Sep 2018 05:13:35 -0000      1.357
> > +++ parse.y 21 Sep 2018 05:16:45 -0000
> > @@ -297,7 +297,7 @@ as4number       : STRING                        {
> >                             free($1);
> >                             YYERROR;
> >                     }
> > -                   if (uvalh == 0 && uval == AS_TRANS) {
> > +                   if (uvalh == 0 && (uval == AS_TRANS || uval == 0)) {
> >                             yyerror("AS %u is reserved and may not be used",
> >                                 AS_TRANS);
> >                             YYERROR;
> > @@ -305,7 +305,7 @@ as4number       : STRING                        {
> >                     $$ = uval | (uvalh << 16);
> >             }
> >             | asnumber {
> > -                   if ($1 == AS_TRANS) {
> > +                   if ($1 == AS_TRANS || $1 == 0) {
> >                             yyerror("AS %u is reserved and may not be used",
> >                                 AS_TRANS);
> >                             YYERROR;
> > 
> 

-- 
:wq Claudio

Reply via email to