summaryrefslogtreecommitdiff
path: root/proto/rip/config.Y
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-05-23 17:22:53 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-05-23 17:40:19 +0200
commit6aaaa63519c88c872f15dcc639643103b563b1c6 (patch)
treecbb3164de6d0b746727b54aec212168b8467f379 /proto/rip/config.Y
parent0705a1c5658c2682c915007f466f55d2a8f7ec14 (diff)
Change parser to handle numbers as unsigned
Lexer always parsed numbers as unsigned, but parser handled them as signed and grammar contained many unnecessary checks for negativity.
Diffstat (limited to 'proto/rip/config.Y')
-rw-r--r--proto/rip/config.Y2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/rip/config.Y b/proto/rip/config.Y
index 25c2ac7a..46f6c177 100644
--- a/proto/rip/config.Y
+++ b/proto/rip/config.Y
@@ -65,7 +65,7 @@ rip_proto_item:
proto_item
| proto_channel
| ECMP bool { RIP_CFG->ecmp = $2 ? RIP_DEFAULT_ECMP_LIMIT : 0; }
- | ECMP bool LIMIT expr { RIP_CFG->ecmp = $2 ? $4 : 0; if ($4 < 0) cf_error("ECMP limit cannot be negative"); }
+ | ECMP bool LIMIT expr { RIP_CFG->ecmp = $2 ? $4 : 0; }
| INFINITY expr { RIP_CFG->infinity = $2; }
| INTERFACE rip_iface
;