mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 22:03:12 +00:00
Merge pull request #7227 from chiragshah6/yang_dev
bgpd, yang : neighbor and peer-group config cmds to transactional clis
This commit is contained in:
commit
9f6c4d4d16
1578
bgpd/bgp_nb.c
1578
bgpd/bgp_nb.c
File diff suppressed because it is too large
Load Diff
892
bgpd/bgp_nb.h
892
bgpd/bgp_nb.h
File diff suppressed because it is too large
Load Diff
8659
bgpd/bgp_nb_config.c
8659
bgpd/bgp_nb_config.c
File diff suppressed because it is too large
Load Diff
2999
bgpd/bgp_vty.c
2999
bgpd/bgp_vty.c
File diff suppressed because it is too large
Load Diff
@ -194,5 +194,20 @@ extern const char *bgp_afi_safi_get_container_str(afi_t afi, safi_t safi);
|
|||||||
extern bool vpn_policy_check_import(struct bgp *bgp, afi_t afi, safi_t safi,
|
extern bool vpn_policy_check_import(struct bgp *bgp, afi_t afi, safi_t safi,
|
||||||
bool v2vimport, char *errmsg,
|
bool v2vimport, char *errmsg,
|
||||||
size_t errmsg_len);
|
size_t errmsg_len);
|
||||||
|
extern int bgp_nb_errmsg_return(char *errmsg, size_t errmsg_len, int ret);
|
||||||
|
extern bool peer_address_self_check(struct bgp *bgp, union sockunion *su);
|
||||||
|
extern int peer_local_interface_cfg(struct bgp *bgp, const char *ip_str,
|
||||||
|
const char *str, char *errmsg,
|
||||||
|
size_t errmsg_len);
|
||||||
|
extern int peer_conf_interface_create(struct bgp *bgp, const char *conf_if,
|
||||||
|
afi_t afi, safi_t safi, bool v6only,
|
||||||
|
const char *peer_group_name, int as_type,
|
||||||
|
as_t as, char *errmsg, size_t errmsg_len);
|
||||||
|
extern int peer_flag_modify_nb(struct bgp *bgp, const char *ip_str,
|
||||||
|
struct peer *peer, uint32_t flag, bool set,
|
||||||
|
char *errmsg, size_t errmsg_len);
|
||||||
|
extern int peer_af_flag_modify_nb(struct peer *peer, afi_t afi, safi_t safi,
|
||||||
|
uint32_t flag, int set, char *errmsg,
|
||||||
|
size_t errmsg_len);
|
||||||
|
|
||||||
#endif /* _QUAGGA_BGP_VTY_H */
|
#endif /* _QUAGGA_BGP_VTY_H */
|
||||||
|
@ -5485,8 +5485,8 @@ int peer_allowas_in_unset(struct peer *peer, afi_t afi, safi_t safi)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int peer_local_as_set(struct peer *peer, as_t as, int no_prepend,
|
int peer_local_as_set(struct peer *peer, as_t as, bool no_prepend,
|
||||||
int replace_as)
|
bool replace_as)
|
||||||
{
|
{
|
||||||
bool old_no_prepend, old_replace_as;
|
bool old_no_prepend, old_replace_as;
|
||||||
struct bgp *bgp = peer->bgp;
|
struct bgp *bgp = peer->bgp;
|
||||||
|
@ -1949,7 +1949,8 @@ extern int peer_distribute_unset(struct peer *, afi_t, safi_t, int);
|
|||||||
extern int peer_allowas_in_set(struct peer *, afi_t, safi_t, int, int);
|
extern int peer_allowas_in_set(struct peer *, afi_t, safi_t, int, int);
|
||||||
extern int peer_allowas_in_unset(struct peer *, afi_t, safi_t);
|
extern int peer_allowas_in_unset(struct peer *, afi_t, safi_t);
|
||||||
|
|
||||||
extern int peer_local_as_set(struct peer *, as_t, int, int);
|
extern int peer_local_as_set(struct peer *, as_t, bool no_prepend,
|
||||||
|
bool replace_as);
|
||||||
extern int peer_local_as_unset(struct peer *);
|
extern int peer_local_as_unset(struct peer *);
|
||||||
|
|
||||||
extern int peer_prefix_list_set(struct peer *, afi_t, safi_t, int,
|
extern int peer_prefix_list_set(struct peer *, afi_t, safi_t, int,
|
||||||
|
@ -1236,6 +1236,10 @@ const char *yang_afi_safi_value2identity(afi_t afi, safi_t safi)
|
|||||||
return "frr-routing:ipv4-labeled-unicast";
|
return "frr-routing:ipv4-labeled-unicast";
|
||||||
if (afi == AFI_IP6 && safi == SAFI_LABELED_UNICAST)
|
if (afi == AFI_IP6 && safi == SAFI_LABELED_UNICAST)
|
||||||
return "frr-routing:ipv6-labeled-unicast";
|
return "frr-routing:ipv6-labeled-unicast";
|
||||||
|
if (afi == AFI_IP && safi == SAFI_FLOWSPEC)
|
||||||
|
return "frr-routing:ipv4-flowspec";
|
||||||
|
if (afi == AFI_IP6 && safi == SAFI_FLOWSPEC)
|
||||||
|
return "frr-routing:ipv6-flowspec";
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -1269,6 +1273,12 @@ void yang_afi_safi_identity2value(const char *key, afi_t *afi, safi_t *safi)
|
|||||||
} else if (strmatch(key, "frr-routing:l2vpn-evpn")) {
|
} else if (strmatch(key, "frr-routing:l2vpn-evpn")) {
|
||||||
*afi = AFI_L2VPN;
|
*afi = AFI_L2VPN;
|
||||||
*safi = SAFI_EVPN;
|
*safi = SAFI_EVPN;
|
||||||
|
} else if (strmatch(key, "frr-routing:ipv4-flowspec")) {
|
||||||
|
*afi = AFI_IP;
|
||||||
|
*safi = SAFI_FLOWSPEC;
|
||||||
|
} else if (strmatch(key, "frr-routing:ipv6-flowspec")) {
|
||||||
|
*afi = AFI_IP6;
|
||||||
|
*safi = SAFI_FLOWSPEC;
|
||||||
} else {
|
} else {
|
||||||
*afi = AFI_UNSPEC;
|
*afi = AFI_UNSPEC;
|
||||||
*safi = SAFI_UNSPEC;
|
*safi = SAFI_UNSPEC;
|
||||||
|
@ -110,7 +110,6 @@ submodule frr-bgp-common-structure {
|
|||||||
container local-as {
|
container local-as {
|
||||||
leaf local-as {
|
leaf local-as {
|
||||||
type inet:as-number;
|
type inet:as-number;
|
||||||
mandatory true;
|
|
||||||
description
|
description
|
||||||
"The local autonomous system number that is to be used when
|
"The local autonomous system number that is to be used when
|
||||||
establishing sessions with the remote peer or peer group, if
|
establishing sessions with the remote peer or peer group, if
|
||||||
@ -200,7 +199,6 @@ submodule frr-bgp-common-structure {
|
|||||||
container neighbor-remote-as {
|
container neighbor-remote-as {
|
||||||
leaf remote-as-type {
|
leaf remote-as-type {
|
||||||
type frr-bt:as-type;
|
type frr-bt:as-type;
|
||||||
mandatory true;
|
|
||||||
description
|
description
|
||||||
"Remote AS type.";
|
"Remote AS type.";
|
||||||
}
|
}
|
||||||
@ -363,18 +361,18 @@ submodule frr-bgp-common-structure {
|
|||||||
description
|
description
|
||||||
"Structural grouping used to include default-originate
|
"Structural grouping used to include default-originate
|
||||||
configuration for both BGP neighbors and peer groups.";
|
configuration for both BGP neighbors and peer groups.";
|
||||||
container default-originate-options {
|
container default-originate {
|
||||||
description
|
description
|
||||||
"default originate parameters for the BGP neighbor or
|
"default originate parameters for the BGP neighbor or
|
||||||
group.";
|
group.";
|
||||||
leaf send-default-route {
|
leaf originate {
|
||||||
type boolean;
|
type boolean;
|
||||||
default "false";
|
default "false";
|
||||||
description
|
description
|
||||||
"If set to 'true', send the default-route to the neighbour(s).";
|
"If set to 'true', send the default-route to the neighbour(s).";
|
||||||
}
|
}
|
||||||
|
|
||||||
leaf rmap-policy-export {
|
leaf route-map {
|
||||||
type frr-route-map:route-map-ref;
|
type frr-route-map:route-map-ref;
|
||||||
description
|
description
|
||||||
"Route-map to specify criteria to originate default.";
|
"Route-map to specify criteria to originate default.";
|
||||||
@ -402,7 +400,14 @@ submodule frr-bgp-common-structure {
|
|||||||
neighbour.";
|
neighbour.";
|
||||||
}
|
}
|
||||||
|
|
||||||
container prefix-limit-options {
|
leaf force-check {
|
||||||
|
type boolean;
|
||||||
|
default false;
|
||||||
|
description
|
||||||
|
"Force check all received routes.";
|
||||||
|
}
|
||||||
|
|
||||||
|
container options {
|
||||||
when "../direction = 'in'";
|
when "../direction = 'in'";
|
||||||
choice options {
|
choice options {
|
||||||
case warning {
|
case warning {
|
||||||
@ -446,7 +451,7 @@ submodule frr-bgp-common-structure {
|
|||||||
}
|
}
|
||||||
|
|
||||||
leaf tr-restart-timer {
|
leaf tr-restart-timer {
|
||||||
type uint32;
|
type uint16;
|
||||||
units "minutes";
|
units "minutes";
|
||||||
description
|
description
|
||||||
"Time interval in seconds after which the BGP session is
|
"Time interval in seconds after which the BGP session is
|
||||||
@ -598,7 +603,7 @@ submodule frr-bgp-common-structure {
|
|||||||
|
|
||||||
leaf send-large-community {
|
leaf send-large-community {
|
||||||
type boolean;
|
type boolean;
|
||||||
default "false";
|
default "true";
|
||||||
description
|
description
|
||||||
"Send large community attribute to this neighbor.";
|
"Send large community attribute to this neighbor.";
|
||||||
}
|
}
|
||||||
@ -614,7 +619,6 @@ submodule frr-bgp-common-structure {
|
|||||||
"BGP Administrative Shutdown Communication.";
|
"BGP Administrative Shutdown Communication.";
|
||||||
leaf enable {
|
leaf enable {
|
||||||
type boolean;
|
type boolean;
|
||||||
mandatory true;
|
|
||||||
description
|
description
|
||||||
"When set to 'true', BGP shutdown communication is enabled.";
|
"When set to 'true', BGP shutdown communication is enabled.";
|
||||||
}
|
}
|
||||||
|
@ -97,8 +97,6 @@ submodule frr-bgp-neighbor {
|
|||||||
|
|
||||||
uses neighbor-update-source;
|
uses neighbor-update-source;
|
||||||
|
|
||||||
uses neighbor-remote-as;
|
|
||||||
|
|
||||||
uses structure-neighbor-group-ebgp-multihop;
|
uses structure-neighbor-group-ebgp-multihop;
|
||||||
|
|
||||||
uses neighbor-local-as-options;
|
uses neighbor-local-as-options;
|
||||||
@ -124,7 +122,6 @@ submodule frr-bgp-neighbor {
|
|||||||
|
|
||||||
leaf enabled {
|
leaf enabled {
|
||||||
type boolean;
|
type boolean;
|
||||||
default "false";
|
|
||||||
description
|
description
|
||||||
"This leaf indicates whether the IPv4 Unicast AFI, SAFI is
|
"This leaf indicates whether the IPv4 Unicast AFI, SAFI is
|
||||||
enabled for the neighbour or group.";
|
enabled for the neighbour or group.";
|
||||||
|
@ -9,6 +9,10 @@ submodule frr-bgp-peer-group {
|
|||||||
prefix inet;
|
prefix inet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
import frr-bgp-types {
|
||||||
|
prefix frr-bt;
|
||||||
|
}
|
||||||
|
|
||||||
include frr-bgp-common-structure;
|
include frr-bgp-common-structure;
|
||||||
include frr-bgp-neighbor;
|
include frr-bgp-neighbor;
|
||||||
|
|
||||||
@ -72,6 +76,8 @@ submodule frr-bgp-peer-group {
|
|||||||
"Configure BGP dynamic neighbors listen range.";
|
"Configure BGP dynamic neighbors listen range.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uses neighbor-remote-as;
|
||||||
|
|
||||||
uses neighbor-parameters;
|
uses neighbor-parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,10 @@ module frr-bgp {
|
|||||||
prefix frr-interface;
|
prefix frr-interface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
import frr-bgp-types {
|
||||||
|
prefix frr-bt;
|
||||||
|
}
|
||||||
|
|
||||||
include "frr-bgp-common-structure";
|
include "frr-bgp-common-structure";
|
||||||
|
|
||||||
include "frr-bgp-common";
|
include "frr-bgp-common";
|
||||||
@ -206,6 +210,25 @@ module frr-bgp {
|
|||||||
"The peer-group with which this neighbor is associated.";
|
"The peer-group with which this neighbor is associated.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
container neighbor-remote-as {
|
||||||
|
leaf remote-as-type {
|
||||||
|
type frr-bt:as-type;
|
||||||
|
mandatory true;
|
||||||
|
description
|
||||||
|
"Remote AS type.";
|
||||||
|
}
|
||||||
|
|
||||||
|
leaf remote-as {
|
||||||
|
when "../remote-as-type = 'as-specified'";
|
||||||
|
type inet:as-number;
|
||||||
|
description
|
||||||
|
"The remote autonomous system number received in
|
||||||
|
the BGP OPEN message.";
|
||||||
|
reference
|
||||||
|
"RFC 4271";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uses neighbor-parameters;
|
uses neighbor-parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,6 +261,8 @@ module frr-bgp {
|
|||||||
"The peer-group with which this neighbor is associated.";
|
"The peer-group with which this neighbor is associated.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uses neighbor-remote-as;
|
||||||
|
|
||||||
uses neighbor-parameters;
|
uses neighbor-parameters;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -552,6 +577,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -578,6 +605,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -604,6 +633,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -630,6 +661,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -656,6 +689,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -799,6 +834,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -825,6 +862,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -851,6 +890,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -877,6 +918,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -903,6 +946,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -1046,6 +1091,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -1072,6 +1119,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -1098,6 +1147,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -1124,6 +1175,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
@ -1150,6 +1203,8 @@ module frr-bgp {
|
|||||||
|
|
||||||
uses structure-neighbor-group-as-path-options;
|
uses structure-neighbor-group-as-path-options;
|
||||||
|
|
||||||
|
uses structure-neighbor-default-originate-options;
|
||||||
|
|
||||||
uses structure-neighbor-group-attr-unchanged;
|
uses structure-neighbor-group-attr-unchanged;
|
||||||
|
|
||||||
uses structure-neighbor-group-orf-capability;
|
uses structure-neighbor-group-orf-capability;
|
||||||
|
Loading…
Reference in New Issue
Block a user