summaryrefslogtreecommitdiffstats
path: root/ripd/rip_routemap.c
diff options
context:
space:
mode:
authorpaul <paul>2006-09-11 02:14:16 +0000
committerpaul <paul>2006-09-11 02:14:16 +0000
commitb20422a4f08183a3d145767f90ce70024d741770 (patch)
treefdc2325f6f52351e3e7fbe390871c8382d471471 /ripd/rip_routemap.c
parentaa7cd219021de755f8eb5872a2f8ee11819d374f (diff)
downloadquagga-b20422a4f08183a3d145767f90ce70024d741770.tar.bz2
quagga-b20422a4f08183a3d145767f90ce70024d741770.tar.xz
[ripd] bug #293: routemap set metric doesn't check for underflow correctly
2006-09-11 Paul Jakma <paul.jakma@sun.com> * rip_routemap.c: (route_set_metric) underflow check needs to use signed, problem identified and diagnosed by Pavel Nikiforov in bug #293.
Diffstat (limited to 'ripd/rip_routemap.c')
-rw-r--r--ripd/rip_routemap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c
index 9d6fd16e..cb87ea55 100644
--- a/ripd/rip_routemap.c
+++ b/ripd/rip_routemap.c
@@ -530,7 +530,7 @@ route_set_metric (void *rule, struct prefix *prefix,
else if (mod->type == metric_absolute)
rinfo->metric_out = mod->metric;
- if (rinfo->metric_out < 1)
+ if ((signed int)rinfo->metric_out < 1)
rinfo->metric_out = 1;
if (rinfo->metric_out > RIP_METRIC_INFINITY)
rinfo->metric_out = RIP_METRIC_INFINITY;