mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 15:06:30 +00:00
[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.
This commit is contained in:
parent
3e557ae1ea
commit
b25ea4d085
@ -2,6 +2,9 @@
|
||||
|
||||
* ripd.c: (rip_read) remove gratuitous use of mid-function
|
||||
declaration of vrecv, bug #278.
|
||||
* rip_routemap.c: (route_set_metric) underflow check needs to
|
||||
use signed, problem identified and diagnosed by Pavel
|
||||
Nikiforov in bug #293.
|
||||
|
||||
2006-06-29 Paul Jakma <paul.jakma@sun.com>
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user