forked from Mirror/frr
ospfd: fix compilation issue with ospfd
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>
This commit is contained in:
parent
3eca551fec
commit
fe3da9e773
|
@ -218,7 +218,7 @@ DEFUN_NOSH (router_ospf,
|
||||||
if (ospf->vrf_id != VRF_UNKNOWN)
|
if (ospf->vrf_id != VRF_UNKNOWN)
|
||||||
ospf->oi_running = 1;
|
ospf->oi_running = 1;
|
||||||
if (IS_DEBUG_OSPF_EVENT)
|
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",
|
instance, ospf->name ? ospf->name : "NIL",
|
||||||
ospf->vrf_id, ospf->oi_running);
|
ospf->vrf_id, ospf->oi_running);
|
||||||
VTY_PUSH_CONTEXT(OSPF_NODE, ospf);
|
VTY_PUSH_CONTEXT(OSPF_NODE, ospf);
|
||||||
|
@ -9600,7 +9600,7 @@ DEFUN (show_ip_ospf_vrfs,
|
||||||
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
|
for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
|
||||||
json_object *json_vrf = NULL;
|
json_object *json_vrf = NULL;
|
||||||
const char *name = NULL;
|
const char *name = NULL;
|
||||||
int vrf_id_ui = 0;
|
int64_t vrf_id_ui = 0;
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
|
@ -9614,7 +9614,8 @@ DEFUN (show_ip_ospf_vrfs,
|
||||||
else
|
else
|
||||||
name = ospf->name;
|
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) {
|
if (uj) {
|
||||||
json_object_int_add(json_vrf, "vrfId", vrf_id_ui);
|
json_object_int_add(json_vrf, "vrfId", vrf_id_ui);
|
||||||
|
|
|
@ -240,7 +240,7 @@ static struct ospf *ospf_new(u_short instance, const char *name)
|
||||||
new->name = XSTRDUP(MTYPE_OSPF_TOP, name);
|
new->name = XSTRDUP(MTYPE_OSPF_TOP, name);
|
||||||
vrf = vrf_lookup_by_name(new->name);
|
vrf = vrf_lookup_by_name(new->name);
|
||||||
if (IS_DEBUG_OSPF_EVENT)
|
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);
|
__PRETTY_FUNCTION__, name, new->vrf_id);
|
||||||
if (vrf)
|
if (vrf)
|
||||||
ospf_vrf_link(new, 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)
|
static int ospf_vrf_new(struct vrf *vrf)
|
||||||
{
|
{
|
||||||
if (IS_DEBUG_OSPF_EVENT)
|
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);
|
vrf->name, vrf->vrf_id);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2023,7 +2023,7 @@ static int ospf_vrf_new(struct vrf *vrf)
|
||||||
static int ospf_vrf_delete(struct vrf *vrf)
|
static int ospf_vrf_delete(struct vrf *vrf)
|
||||||
{
|
{
|
||||||
if (IS_DEBUG_OSPF_EVENT)
|
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);
|
vrf->name, vrf->vrf_id);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2036,7 +2036,7 @@ static int ospf_vrf_enable(struct vrf *vrf)
|
||||||
vrf_id_t old_vrf_id = VRF_DEFAULT;
|
vrf_id_t old_vrf_id = VRF_DEFAULT;
|
||||||
|
|
||||||
if (IS_DEBUG_OSPF_EVENT)
|
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);
|
__PRETTY_FUNCTION__, vrf->name, vrf->vrf_id);
|
||||||
|
|
||||||
ospf = ospf_lookup_by_name(vrf->name);
|
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". */
|
/* We have instance configured, link to VRF and make it "up". */
|
||||||
ospf_vrf_link(ospf, vrf);
|
ospf_vrf_link(ospf, vrf);
|
||||||
if (IS_DEBUG_OSPF_EVENT)
|
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,
|
__PRETTY_FUNCTION__, vrf->name, ospf->vrf_id,
|
||||||
old_vrf_id);
|
old_vrf_id);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue