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).
Should we kill '{' optnl '}' somewhen later?
Apart from that OK claudio@
> ;
>
> interfaceopts_l : interfaceopts_l interfaceoptsl nl
> Index: ripd.conf.5
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ripd/ripd.conf.5,v
> retrieving revision 1.16
> diff -u -p -r1.16 ripd.conf.5
> --- ripd.conf.5 10 Nov 2018 19:12:34 -0000 1.16
> +++ ripd.conf.5 10 Nov 2018 19:54:45 -0000
> @@ -156,7 +156,10 @@ Each interface can have several paramete
> they are inherited.
> .Bd -literal -offset indent
> interface em0 {
> + cost 9
> + auth-type none
> }
> +interface ix1
> .Ed
> .Pp
> Interface-specific parameters are listed below.
>
--
:wq Claudio