summaryrefslogtreecommitdiffstats
path: root/proto
diff options
context:
space:
mode:
Diffstat (limited to 'proto')
-rw-r--r--proto/ospf/config.Y1
-rw-r--r--proto/ospf/ospf.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/proto/ospf/config.Y b/proto/ospf/config.Y
index 7a07e6e..3a021db 100644
--- a/proto/ospf/config.Y
+++ b/proto/ospf/config.Y
@@ -75,6 +75,7 @@ ospf_area_opts:
ospf_area_item:
STUB COST expr { this_area->stub = $3 ; if($3<=0) cf_error("Stub cost must be greater than zero"); }
+ | STUB bool {if($2) { if(!this_area->stub) this_area->stub=DEFAULT_STUB_COST;}else{ this_area->stub=0;}}
| NETWORKS '{' pref_list '}'
| INTERFACE ospf_iface_list
| ospf_vlink
diff --git a/proto/ospf/ospf.h b/proto/ospf/ospf.h
index 8f0b498..6992f3e 100644
--- a/proto/ospf/ospf.h
+++ b/proto/ospf/ospf.h
@@ -53,6 +53,7 @@
#define DEFAULT_OSPFTICK 1
#define DEFAULT_RFC1583 0 /* compatibility with rfc1583 */
+#define DEFAULT_STUB_COST 1000
struct ospf_config