]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: fix compilation issue with ospfd
authorPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 18 Dec 2017 11:07:22 +0000 (12:07 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 22 Jan 2018 12:52:24 +0000 (13:52 +0100)
the change of vrf_id field from 16 bit to 32 bit leads to some changes
in other daemon.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
ospfd/ospf_vty.c
ospfd/ospfd.c

index e2aa445572c51dc4436d3f3a6c7db9df0f217d9a..6d28c2cdc5d39b78571931b3d6c968977a125438 100644 (file)
@@ -218,7 +218,7 @@ DEFUN_NOSH (router_ospf,
                if (ospf->vrf_id != VRF_UNKNOWN)
                        ospf->oi_running = 1;
                if (IS_DEBUG_OSPF_EVENT)
-                       zlog_debug("Config command 'router ospf %d' received, vrf %s id %d oi_running %u",
+                       zlog_debug("Config command 'router ospf %d' received, vrf %s id %u oi_running %u",
                                   instance,  ospf->name ? ospf->name : "NIL",
                                   ospf->vrf_id, ospf->oi_running);
                VTY_PUSH_CONTEXT(OSPF_NODE, ospf);
@@ -9600,7 +9600,7 @@ DEFUN (show_ip_ospf_vrfs,
        for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
                json_object *json_vrf = NULL;
                const char *name = NULL;
-               int vrf_id_ui = 0;
+               int64_t vrf_id_ui = 0;
 
                count++;
 
@@ -9614,7 +9614,8 @@ DEFUN (show_ip_ospf_vrfs,
                else
                        name = ospf->name;
 
-               vrf_id_ui = (ospf->vrf_id == VRF_UNKNOWN) ? -1 : ospf->vrf_id;
+               vrf_id_ui = (ospf->vrf_id == VRF_UNKNOWN) ? -1 :
+                       (int64_t) ospf->vrf_id;
 
                if (uj) {
                        json_object_int_add(json_vrf, "vrfId", vrf_id_ui);
index 862e87e40fbd6312d60167f184419d25b4b71e4d..6d583e9b4ac4e486cfd6468dfc2f0390521b2084 100644 (file)
@@ -240,7 +240,7 @@ static struct ospf *ospf_new(u_short instance, const char *name)
                new->name = XSTRDUP(MTYPE_OSPF_TOP, name);
                vrf = vrf_lookup_by_name(new->name);
                if (IS_DEBUG_OSPF_EVENT)
-                       zlog_debug("%s: Create new ospf instance with vrf_name %s vrf_id %d",
+                       zlog_debug("%s: Create new ospf instance with vrf_name %s vrf_id %u",
                                   __PRETTY_FUNCTION__, name, new->vrf_id);
                if (vrf)
                        ospf_vrf_link(new, vrf);
@@ -2013,7 +2013,7 @@ void ospf_vrf_unlink(struct ospf *ospf, struct vrf *vrf)
 static int ospf_vrf_new(struct vrf *vrf)
 {
        if (IS_DEBUG_OSPF_EVENT)
-               zlog_debug("%s: VRF Created: %s(%d)", __PRETTY_FUNCTION__,
+               zlog_debug("%s: VRF Created: %s(%u)", __PRETTY_FUNCTION__,
                           vrf->name, vrf->vrf_id);
 
        return 0;
@@ -2023,7 +2023,7 @@ static int ospf_vrf_new(struct vrf *vrf)
 static int ospf_vrf_delete(struct vrf *vrf)
 {
        if (IS_DEBUG_OSPF_EVENT)
-               zlog_debug("%s: VRF Deletion: %s(%d)", __PRETTY_FUNCTION__,
+               zlog_debug("%s: VRF Deletion: %s(%u)", __PRETTY_FUNCTION__,
                           vrf->name, vrf->vrf_id);
 
        return 0;
@@ -2036,7 +2036,7 @@ static int ospf_vrf_enable(struct vrf *vrf)
        vrf_id_t old_vrf_id = VRF_DEFAULT;
 
        if (IS_DEBUG_OSPF_EVENT)
-               zlog_debug("%s: VRF %s id %d enabled",
+               zlog_debug("%s: VRF %s id %u enabled",
                           __PRETTY_FUNCTION__, vrf->name, vrf->vrf_id);
 
        ospf = ospf_lookup_by_name(vrf->name);
@@ -2045,7 +2045,7 @@ static int ospf_vrf_enable(struct vrf *vrf)
                /* We have instance configured, link to VRF and make it "up". */
                ospf_vrf_link(ospf, vrf);
                if (IS_DEBUG_OSPF_EVENT)
-                       zlog_debug("%s: ospf linked to vrf %s vrf_id %d (old id %d)",
+                       zlog_debug("%s: ospf linked to vrf %s vrf_id %u (old id %u)",
                                   __PRETTY_FUNCTION__, vrf->name, ospf->vrf_id,
                                   old_vrf_id);