mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 20:07:46 +00:00
bgpd: Fix partial match on <external|internal> for remote-as
Ticket: CM-8545 Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
1084263fb1
commit
7ae5fc8107
@ -2547,12 +2547,12 @@ peer_remote_as_vty (struct vty *vty, const char *peer_str,
|
|||||||
|
|
||||||
bgp = vty->index;
|
bgp = vty->index;
|
||||||
|
|
||||||
if (strncmp(as_str, "internal", strlen("internal")) == 0)
|
if (as_str[0] == 'i')
|
||||||
{
|
{
|
||||||
as = 0;
|
as = 0;
|
||||||
as_type = AS_INTERNAL;
|
as_type = AS_INTERNAL;
|
||||||
}
|
}
|
||||||
else if (strncmp(as_str, "external", strlen("external")) == 0)
|
else if (as_str[0] == 'e')
|
||||||
{
|
{
|
||||||
as = 0;
|
as = 0;
|
||||||
as_type = AS_EXTERNAL;
|
as_type = AS_EXTERNAL;
|
||||||
@ -2644,11 +2644,11 @@ peer_conf_interface_get (struct vty *vty, const char *conf_if, afi_t afi,
|
|||||||
|
|
||||||
if (as_str)
|
if (as_str)
|
||||||
{
|
{
|
||||||
if (strncmp(as_str, "internal", strlen("internal")) == 0)
|
if (as_str[0] == 'i')
|
||||||
{
|
{
|
||||||
as_type = AS_INTERNAL;
|
as_type = AS_INTERNAL;
|
||||||
}
|
}
|
||||||
else if (strncmp(as_str, "external", strlen("external")) == 0)
|
else if (as_str[0] == 'e')
|
||||||
{
|
{
|
||||||
as_type = AS_EXTERNAL;
|
as_type = AS_EXTERNAL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user