summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
authorpaul <paul>2003-08-27 06:45:32 +0000
committerpaul <paul>2003-08-27 06:45:32 +0000
commit537d8ea92bbf96086e03a0da5a7d26ee4b92e0cc (patch)
tree392b903719b0ebcdc793aad7f35bdd5801e49a84 /bgpd
parentfd6ff2fc6b221f2c2c30ef0d29f5e938c1737577 (diff)
2003-08-27 Jay Fenlason <fenlason@redhat.com>
* bgpd/bgp_routemap.c: attr->med is type u_in32_t, should be compared with UINT32_MAX * ospfd/ospfd.c: remove redundant assert * zebra/rtadv.c: add missing include for zebra/rib.h
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_routemap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 9bc4e6d5..a2923fb1 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -879,17 +879,17 @@ route_set_metric (void *rule, struct prefix *prefix,
if (strncmp (metric, "+", 1) == 0)
{
- if (bgp_info->attr->med/2 + metric_val/2 > ULONG_MAX/2)
- bgp_info->attr->med = ULONG_MAX-1;
+ if (bgp_info->attr->med/2 + metric_val/2 > UINT32_MAX/2)
+ bgp_info->attr->med = UINT32_MAX-1;
else
- bgp_info->attr->med += metric_val;
+ bgp_info->attr->med += metric_val;
}
else if (strncmp (metric, "-", 1) == 0)
{
- if (bgp_info->attr->med <= metric_val)
- bgp_info->attr->med = 0;
+ if (bgp_info->attr->med <= metric_val)
+ bgp_info->attr->med = 0;
else
- bgp_info->attr->med -= metric_val;
+ bgp_info->attr->med -= metric_val;
}
}
}