mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 10:22:07 +00:00
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
This commit is contained in:
parent
fd6ff2fc6b
commit
537d8ea92b
@ -879,17 +879,17 @@ route_set_metric (void *rule, struct prefix *prefix,
|
|||||||
|
|
||||||
if (strncmp (metric, "+", 1) == 0)
|
if (strncmp (metric, "+", 1) == 0)
|
||||||
{
|
{
|
||||||
if (bgp_info->attr->med/2 + metric_val/2 > ULONG_MAX/2)
|
if (bgp_info->attr->med/2 + metric_val/2 > UINT32_MAX/2)
|
||||||
bgp_info->attr->med = ULONG_MAX-1;
|
bgp_info->attr->med = UINT32_MAX-1;
|
||||||
else
|
else
|
||||||
bgp_info->attr->med += metric_val;
|
bgp_info->attr->med += metric_val;
|
||||||
}
|
}
|
||||||
else if (strncmp (metric, "-", 1) == 0)
|
else if (strncmp (metric, "-", 1) == 0)
|
||||||
{
|
{
|
||||||
if (bgp_info->attr->med <= metric_val)
|
if (bgp_info->attr->med <= metric_val)
|
||||||
bgp_info->attr->med = 0;
|
bgp_info->attr->med = 0;
|
||||||
else
|
else
|
||||||
bgp_info->attr->med -= metric_val;
|
bgp_info->attr->med -= metric_val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -765,8 +765,7 @@ ospf_network_run (struct ospf *ospf, struct prefix *p, struct ospf_area *area)
|
|||||||
&& ! ospf_if_is_configured (ospf, &(addr->u.prefix4))
|
&& ! ospf_if_is_configured (ospf, &(addr->u.prefix4))
|
||||||
&& ospf_network_match_iface(co,p))
|
&& ospf_network_match_iface(co,p))
|
||||||
{
|
{
|
||||||
struct ospf_interface *oi;
|
struct ospf_interface *oi;
|
||||||
assert(co);
|
|
||||||
|
|
||||||
oi = ospf_if_new (ospf, ifp, co->address);
|
oi = ospf_if_new (ospf, ifp, co->address);
|
||||||
oi->connected = co;
|
oi->connected = co;
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "zebra/rtadv.h"
|
#include "zebra/rtadv.h"
|
||||||
#include "zebra/debug.h"
|
#include "zebra/debug.h"
|
||||||
#include "zebra/zserv.h"
|
#include "zebra/zserv.h"
|
||||||
|
#include "zebra/rib.h"
|
||||||
|
|
||||||
extern struct zebra_privs_t zserv_privs;
|
extern struct zebra_privs_t zserv_privs;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user