]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Added handling of STUB bool.
authorOndrej Filip <feela@network.cz>
Fri, 16 Jul 2004 08:27:11 +0000 (08:27 +0000)
committerOndrej Filip <feela@network.cz>
Fri, 16 Jul 2004 08:27:11 +0000 (08:27 +0000)
proto/ospf/config.Y
proto/ospf/ospf.h

index 7a07e6e25614d679ee1027f61321d619b87554ec..3a021db9795c42af49a31520fdc340cdbae1a356 100644 (file)
@@ -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
index 8f0b49837d83c3cab5598b9eca97bac32f211cf5..6992f3ebf7709cc189d4e57b1aeb759bf5d5b4c8 100644 (file)
@@ -53,6 +53,7 @@
 
 #define DEFAULT_OSPFTICK 1
 #define DEFAULT_RFC1583 0      /* compatibility with rfc1583 */
+#define DEFAULT_STUB_COST 1000
 
 
 struct ospf_config