summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
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;
}
}
}