]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2003-08-27 Jay Fenlason <fenlason@redhat.com>
authorpaul <paul>
Wed, 27 Aug 2003 06:45:32 +0000 (06:45 +0000)
committerpaul <paul>
Wed, 27 Aug 2003 06:45:32 +0000 (06:45 +0000)
* 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

bgpd/bgp_routemap.c
ospfd/ospfd.c
zebra/rtadv.c

index 9bc4e6d51ce202664b1eb91eeee29fd316c726d2..a2923fb1b6900950850fecb11f94250cc20e1d58 100644 (file)
@@ -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;
            }
        }
     }
index 4418c77778266ef87c7fdb53d797c50efa0d3bc0..aeae8e131b9318f7d205879edef16db5012c37e4 100644 (file)
@@ -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_network_match_iface(co,p))
            {
-               struct ospf_interface *oi;
-               assert(co);
+       struct ospf_interface *oi;
                
                oi = ospf_if_new (ospf, ifp, co->address);
                oi->connected = co;
index a6e2d920176cbdfe6710bf40d9bda69a63f77cd2..f7d336cae329d6b7ac055267e7d18f5733d5bc63 100644 (file)
@@ -35,6 +35,7 @@
 #include "zebra/rtadv.h"
 #include "zebra/debug.h"
 #include "zebra/zserv.h"
+#include "zebra/rib.h"
 
 extern struct zebra_privs_t zserv_privs;