On Wed, Jul 07, 2010 at 01:08:02PM -0700, Andrew Klettke wrote:
> All,
> 
> A fresh install of OpenBSD 4.7 includes the default ospfd.conf (here
> are just the first 11 lines):
> 
> # $OpenBSD: ospfd.conf,v 1.4 2007/06/19 16:49:56 reyk Exp $
> 
> # macros
> password="secret"
> 
> # global configuration
> # router-id 10.0.0.1
> # fib-update no
> # stub router no
> # spf-delay 1
> # spf-holdtime 5
> 
> If you uncomment out the "fib-update no" line, and have Ospfd
> perform a syntax check of the file...
> 
> $ sudo ospfd -nf /etc/ospfd.conf
> WARNING: IP forwarding NOT enabled, running as stub router
> /etc/ospfd.conf:8: syntax error
> 
> Why does uncommenting a line in the default configuration throw a
> syntax error? Under 4.7, Ospfd will ALWAYS update the FIB, as you
> cannot tell it not to.
> 
> Surely, this is a bug.
> 

It was a bug and it is fixed in -current. The keyword array was not
correctly sorted and so the parser got confused. The attached diff fixes
the problem.

-- 
:wq Claudio

Index: parse.y
===================================================================
RCS file: /cvs/src/usr.sbin/ospfd/parse.y,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -p -r1.70 -r1.71
--- parse.y     16 Feb 2010 08:39:05 -0000      1.70
+++ parse.y     24 Mar 2010 07:18:39 -0000      1.71
@@ -1,4 +1,4 @@
-/*     $OpenBSD: parse.y,v 1.70 2010/02/16 08:39:05 dlg Exp $ */
+/*     $OpenBSD: parse.y,v 1.71 2010/03/24 07:18:39 gollo Exp $ */
 
 /*
  * Copyright (c) 2004, 2005 Esben Norby <no...@openbsd.org>
@@ -721,8 +721,8 @@ lookup(char *s)
                {"auth-type",           AUTHTYPE},
                {"demote",              DEMOTE},
                {"external-tag",        EXTTAG},
-               {"fib-update",          FIBUPDATE},
                {"fast-hello-interval", FASTHELLOINTERVAL},
+               {"fib-update",          FIBUPDATE},
                {"hello-interval",      HELLOINTERVAL},
                {"include",             INCLUDE},
                {"interface",           INTERFACE},

Reply via email to