diff options
author | Ondrej Filip <feela@network.cz> | 2004-06-09 12:39:49 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2004-06-09 12:39:49 +0000 |
commit | 7df86c25fc6c871795265faebe02bf4dcecdd190 (patch) | |
tree | 01bcb5c60d05ff1dd10a79cf43f7535345b8154e /proto/ospf/config.Y | |
parent | b7e9c74cba36ed6932dbc30a4b9b0b9f9a06dba5 (diff) |
Better checking of configuration.
Diffstat (limited to 'proto/ospf/config.Y')
-rw-r--r-- | proto/ospf/config.Y | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/proto/ospf/config.Y b/proto/ospf/config.Y index f92109e4..3a9904fb 100644 --- a/proto/ospf/config.Y +++ b/proto/ospf/config.Y @@ -81,14 +81,14 @@ ospf_area_item: ; ospf_iface_item: - COST expr { OSPF_PATT->cost = $2 ; if($2<=0) cf_error("Cost must be greater than zero"); } - | HELLO expr { OSPF_PATT->helloint = $2 ; if($2<=0) cf_error("Hello int must be greater than zero"); } - | POLL expr { OSPF_PATT->pollint = $2 ; if($2<=0) cf_error("Poll int must be greater than zero"); } - | RETRANSMIT expr { OSPF_PATT->rxmtint = $2 ; if($2<=0) cf_error("Retransmit int must be greater than zero"); } - | TRANSMIT DELAY expr { OSPF_PATT->inftransdelay = $3 ; if($3<=0) cf_error("Transmit delay must be greater than zero"); } - | PRIORITY expr { OSPF_PATT->priority = $2 ; } + COST expr { OSPF_PATT->cost = $2 ; if (($2<=0) || ($2>65535)) cf_error("Cost must be in range 1-65535"); } + | HELLO expr { OSPF_PATT->helloint = $2 ; if (($2<=0) || ($2>65535)) cf_error("Hello interval must be in range 1-65535"); } + | POLL expr { OSPF_PATT->pollint = $2 ; if ($2<=0) cf_error("Poll int must be greater than zero"); } + | RETRANSMIT expr { OSPF_PATT->rxmtint = $2 ; if ($2<=0) cf_error("Retransmit int must be greater than zero"); } + | TRANSMIT DELAY expr { OSPF_PATT->inftransdelay = $3 ; if (($3<=0) || ($3>65535)) cf_error("Transmit delay must be in range 1-65535"); } + | PRIORITY expr { OSPF_PATT->priority = $2 ; if (($2<0) || ($2>255)) cf_error("Priority must be in range 0-255")} | WAIT expr { OSPF_PATT->waitint = $2 ; } - | DEAD COUNT expr { OSPF_PATT->deadc = $3 ; if($3<=1) cf_error("Dead count must be greater than one"); } + | DEAD COUNT expr { OSPF_PATT->deadc = $3 ; if ($3<=1) cf_error("Dead count must be greater than one"); } | TYPE BROADCAST { OSPF_PATT->type = OSPF_IT_BCAST ; } | TYPE NONBROADCAST { OSPF_PATT->type = OSPF_IT_NBMA ; } | TYPE POINTOPOINT { OSPF_PATT->type = OSPF_IT_PTP ; } @@ -98,7 +98,6 @@ ospf_iface_item: | AUTHENTICATION NONE { OSPF_PATT->autype=AU_NONE ; } | AUTHENTICATION SIMPLE { OSPF_PATT->autype=AU_SIMPLE ; } | PASSWORD TEXT { memcpy(OSPF_PATT->password, $2, 8); } - | ; pref_list: |