mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 23:42:27 +00:00
zebra: pass ERR_STR_SZ in zebra_vxlan_process_vrf_vni_cmd
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
This commit is contained in:
parent
c05a738b31
commit
3f02fbab67
@ -1913,7 +1913,7 @@ DEFUN (vrf_vni_mapping,
|
||||
assert(vrf);
|
||||
assert(zvrf);
|
||||
|
||||
ret = zebra_vxlan_process_vrf_vni_cmd(zvrf, vni, err, 1);
|
||||
ret = zebra_vxlan_process_vrf_vni_cmd(zvrf, vni, err, ERR_STR_SZ, 1);
|
||||
if (ret != 0) {
|
||||
vty_out(vty, "%s\n", err);
|
||||
return CMD_WARNING;
|
||||
@ -1938,7 +1938,7 @@ DEFUN (no_vrf_vni_mapping,
|
||||
assert(vrf);
|
||||
assert(zvrf);
|
||||
|
||||
ret = zebra_vxlan_process_vrf_vni_cmd(zvrf, vni, err, 0);
|
||||
ret = zebra_vxlan_process_vrf_vni_cmd(zvrf, vni, err, ERR_STR_SZ, 0);
|
||||
if (ret != 0) {
|
||||
vty_out(vty, "%s\n", err);
|
||||
return CMD_WARNING;
|
||||
|
@ -6293,7 +6293,8 @@ int zebra_vxlan_if_add(struct interface *ifp)
|
||||
}
|
||||
|
||||
int zebra_vxlan_process_vrf_vni_cmd(struct zebra_vrf *zvrf,
|
||||
vni_t vni, char *err,
|
||||
vni_t vni,
|
||||
char *err, int err_str_sz,
|
||||
int add)
|
||||
{
|
||||
zebra_l3vni_t *zl3vni = NULL;
|
||||
@ -6315,7 +6316,7 @@ int zebra_vxlan_process_vrf_vni_cmd(struct zebra_vrf *zvrf,
|
||||
|
||||
/* check if the vni is already present under zvrf */
|
||||
if (zvrf->l3vni) {
|
||||
snprintf(err, ERR_STR_SZ,
|
||||
snprintf(err, err_str_sz,
|
||||
"VNI is already configured under the vrf");
|
||||
return -1;
|
||||
}
|
||||
@ -6323,7 +6324,7 @@ int zebra_vxlan_process_vrf_vni_cmd(struct zebra_vrf *zvrf,
|
||||
/* check if this VNI is already present in the system */
|
||||
zl3vni = zl3vni_lookup(vni);
|
||||
if (zl3vni) {
|
||||
snprintf(err, ERR_STR_SZ,
|
||||
snprintf(err, err_str_sz,
|
||||
"VNI is already configured as L3-VNI");
|
||||
return -1;
|
||||
}
|
||||
@ -6331,7 +6332,7 @@ int zebra_vxlan_process_vrf_vni_cmd(struct zebra_vrf *zvrf,
|
||||
/* add the L3-VNI to the global table */
|
||||
zl3vni = zl3vni_add(vni, zvrf_id(zvrf));
|
||||
if (!zl3vni) {
|
||||
snprintf(err, ERR_STR_SZ,
|
||||
snprintf(err, err_str_sz,
|
||||
"Could not add L3-VNI");
|
||||
return -1;
|
||||
}
|
||||
@ -6358,7 +6359,7 @@ int zebra_vxlan_process_vrf_vni_cmd(struct zebra_vrf *zvrf,
|
||||
} else {
|
||||
zl3vni = zl3vni_lookup(vni);
|
||||
if (!zl3vni) {
|
||||
snprintf(err, ERR_STR_SZ, "VNI doesn't exist");
|
||||
snprintf(err, err_str_sz, "VNI doesn't exist");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ extern int zebra_vxlan_advertise_all_vni(struct zserv *client,
|
||||
u_short length,
|
||||
struct zebra_vrf *zvrf);
|
||||
extern int zebra_vxlan_process_vrf_vni_cmd(struct zebra_vrf*, vni_t, char*,
|
||||
int);
|
||||
int, int);
|
||||
extern void zebra_vxlan_init_tables(struct zebra_vrf *zvrf);
|
||||
extern void zebra_vxlan_close_tables(struct zebra_vrf *);
|
||||
extern void zebra_vxlan_ns_init(struct zebra_ns *zns);
|
||||
|
Loading…
Reference in New Issue
Block a user