On Sun, Nov 11, 2018 at 09:48:38AM +0100, Claudio Jeker wrote:
> On Sat, Nov 10, 2018 at 09:17:57PM +0100, Remi Locherer wrote:
> > Hi,
> >
> > ripd wants curly braces for interface blocks even if no parameters are
> > specified. This is inconsistent with other daemons and a bit annoying.
> >
> > Below diff makes ripd accepting
> > interface if0
> > without { } afterwards. The example in the man page shows the interface
> > statement with and without { }.
> >
> > OK?
> >
> > Remi
> >
> >
> >
> > Index: parse.y
> > ===================================================================
> > RCS file: /cvs/src/usr.sbin/ripd/parse.y,v
> > retrieving revision 1.43
> > diff -u -p -r1.43 parse.y
> > --- parse.y 1 Nov 2018 00:18:44 -0000 1.43
> > +++ parse.y 10 Nov 2018 19:54:45 -0000
> > @@ -356,6 +356,7 @@ interface : INTERFACE STRING {
> >
> > interface_block : '{' optnl interfaceopts_l '}'
> > | '{' optnl '}'
> > + |
>
> Normaly we use the empty as first expand of a rule and also use a comment
> like /* empty */ to make them a bit easier to read (and not overlook).
I commited it with /* empty */ first.
> Should we kill '{' optnl '}' somewhen later?
This would break existing configs. Until now this form was enforced.
I'm not sure it's worth it.