mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 22:50:14 +00:00
Merge pull request #9434 from anlancs/fix-zebra-mpls-cmd
zebra: fix wrong check of mpls command
This commit is contained in:
commit
b87c5f4dd1
@ -67,11 +67,6 @@ static int zebra_mpls_transit_lsp(struct vty *vty, int add_cmd,
|
|||||||
return CMD_WARNING_CONFIG_FAILED;
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gate_str == NULL) {
|
|
||||||
vty_out(vty, "%% No Nexthop Information\n");
|
|
||||||
return CMD_WARNING_CONFIG_FAILED;
|
|
||||||
}
|
|
||||||
|
|
||||||
out_label = MPLS_LABEL_IMPLICIT_NULL; /* as initialization */
|
out_label = MPLS_LABEL_IMPLICIT_NULL; /* as initialization */
|
||||||
label = atoi(inlabel_str);
|
label = atoi(inlabel_str);
|
||||||
if (!IS_MPLS_UNRESERVED_LABEL(label)) {
|
if (!IS_MPLS_UNRESERVED_LABEL(label)) {
|
||||||
@ -91,7 +86,9 @@ static int zebra_mpls_transit_lsp(struct vty *vty, int add_cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
in_label = label;
|
in_label = label;
|
||||||
|
gtype = NEXTHOP_TYPE_BLACKHOLE; /* as initialization */
|
||||||
|
|
||||||
|
if (gate_str) {
|
||||||
/* Gateway is a IPv4 or IPv6 nexthop. */
|
/* Gateway is a IPv4 or IPv6 nexthop. */
|
||||||
ret = inet_pton(AF_INET6, gate_str, &gate.ipv6);
|
ret = inet_pton(AF_INET6, gate_str, &gate.ipv6);
|
||||||
if (ret == 1)
|
if (ret == 1)
|
||||||
@ -105,6 +102,7 @@ static int zebra_mpls_transit_lsp(struct vty *vty, int add_cmd,
|
|||||||
return CMD_WARNING_CONFIG_FAILED;
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (outlabel_str) {
|
if (outlabel_str) {
|
||||||
if (outlabel_str[0] == 'i')
|
if (outlabel_str[0] == 'i')
|
||||||
|
Loading…
Reference in New Issue
Block a user