mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 16:26:10 +00:00
bgpd: Disallow ebgp-multihop on swpX peers
Disallow setting ebgp-multihop on peers directly connected via an interface. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
60cd035685
commit
63fa10b595
@ -304,6 +304,9 @@ bgp_vty_return (struct vty *vty, int ret)
|
|||||||
case BGP_ERR_INVALID_FOR_DYNAMIC_PEER:
|
case BGP_ERR_INVALID_FOR_DYNAMIC_PEER:
|
||||||
str = "Operation not allowed on a dynamic neighbor";
|
str = "Operation not allowed on a dynamic neighbor";
|
||||||
break;
|
break;
|
||||||
|
case BGP_ERR_INVALID_FOR_DIRECT_PEER:
|
||||||
|
str = "Operation not allowed on a directly connected neighbor";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (str)
|
if (str)
|
||||||
{
|
{
|
||||||
@ -4434,6 +4437,9 @@ peer_ebgp_multihop_set_vty (struct vty *vty, const char *ip_str,
|
|||||||
if (! peer)
|
if (! peer)
|
||||||
return CMD_WARNING;
|
return CMD_WARNING;
|
||||||
|
|
||||||
|
if (peer->conf_if)
|
||||||
|
return bgp_vty_return (vty, BGP_ERR_INVALID_FOR_DIRECT_PEER);
|
||||||
|
|
||||||
if (! ttl_str)
|
if (! ttl_str)
|
||||||
ttl = MAXTTL;
|
ttl = MAXTTL;
|
||||||
else
|
else
|
||||||
|
@ -1120,6 +1120,7 @@ enum bgp_clear_type
|
|||||||
#define BGP_ERR_DYNAMIC_NEIGHBORS_RANGE_NOT_FOUND -31
|
#define BGP_ERR_DYNAMIC_NEIGHBORS_RANGE_NOT_FOUND -31
|
||||||
#define BGP_ERR_INVALID_FOR_DYNAMIC_PEER -32
|
#define BGP_ERR_INVALID_FOR_DYNAMIC_PEER -32
|
||||||
#define BGP_ERR_MAX -33
|
#define BGP_ERR_MAX -33
|
||||||
|
#define BGP_ERR_INVALID_FOR_DIRECT_PEER -34
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enumeration of different policy kinds a peer can be configured with.
|
* Enumeration of different policy kinds a peer can be configured with.
|
||||||
|
Loading…
Reference in New Issue
Block a user