summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-06-28 22:35:35 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-06-28 22:35:35 +0000
commit6ff6c4ae5d89e6f361ad629a3ebcdcb919e298b5 (patch)
tree05941f99913cb728996a5d2cb55ee069b00a0ff7 /usr.sbin/ospfd
parentdda87b09759fb6a85acc1cfff22cc9fc8098a323 (diff)
Make it possible to specify interfaces just by using "interface em0" without
a {} block. Only drawback is that it is no longer possible to do "interface em0\n{ ...". OK henning@ norby@ some time ago
Diffstat (limited to 'usr.sbin/ospfd')
-rw-r--r--usr.sbin/ospfd/parse.y18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/ospfd/parse.y b/usr.sbin/ospfd/parse.y
index 55dc8f3e6fc..544be85073e 100644
--- a/usr.sbin/ospfd/parse.y
+++ b/usr.sbin/ospfd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.15 2005/05/26 18:46:16 norby Exp $ */
+/* $OpenBSD: parse.y,v 1.16 2005/06/28 22:35:34 claudio Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -251,7 +251,7 @@ conf_main : METRIC number {
free($2);
}
| RFC1583COMPAT yesno {
- conf->rfc1583compat = $2;
+ conf->rfc1583compat = $2;
}
| SPFDELAY number {
if ($2 < MIN_SPF_DELAY || $2 > MAX_SPF_DELAY) {
@@ -352,9 +352,7 @@ area : AREA string {
}
free($2);
area = conf_get_area(id);
- } optnl '{' optnl {
-
- } areaopts_l '}' {
+ } '{' optnl areaopts_l '}' {
area = NULL;
}
;
@@ -417,7 +415,7 @@ areaoptsl : interface nl
}
;
-interface : INTERFACE STRING {
+interface : INTERFACE STRING {
struct kif *kif;
if ((kif = kif_findname($2)) == NULL) {
@@ -434,13 +432,15 @@ interface : INTERFACE STRING {
iface, entry);
iface->rtr_id = conf->rtr_id;
iface->passive = 0;
- } optnl '{' optnl {
-
- } interfaceopts_l '}' {
+ } interface_block {
iface = NULL;
}
;
+interface_block : '{' optnl interfaceopts_l '}'
+ |
+ ;
+
interfaceopts_l : interfaceopts_l interfaceoptsl
| interfaceoptsl
;