mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 05:58:17 +00:00
Merge pull request #10170 from idryzhov/route-map-show
This commit is contained in:
commit
ed856b1e59
@ -550,23 +550,18 @@ void route_map_condition_show(struct vty *vty, const struct lyd_node *dnode,
|
|||||||
vty_out(vty, " match interface %s\n",
|
vty_out(vty, " match interface %s\n",
|
||||||
yang_dnode_get_string(
|
yang_dnode_get_string(
|
||||||
dnode, "./rmap-match-condition/interface"));
|
dnode, "./rmap-match-condition/interface"));
|
||||||
} else if (IS_MATCH_IPv4_ADDRESS_LIST(condition)
|
} else if (IS_MATCH_IPv4_ADDRESS_LIST(condition)) {
|
||||||
|| IS_MATCH_IPv6_NEXTHOP_LIST(condition)
|
vty_out(vty, " match ip address %s\n",
|
||||||
|| IS_MATCH_IPv4_NEXTHOP_LIST(condition)) {
|
yang_dnode_get_string(
|
||||||
acl = NULL;
|
dnode, "./rmap-match-condition/list-name"));
|
||||||
if ((ln = yang_dnode_get(dnode,
|
} else if (IS_MATCH_IPv4_NEXTHOP_LIST(condition)) {
|
||||||
"./rmap-match-condition/list-name"))
|
vty_out(vty, " match ip next-hop %s\n",
|
||||||
!= NULL)
|
yang_dnode_get_string(
|
||||||
acl = yang_dnode_get_string(ln, NULL);
|
dnode, "./rmap-match-condition/list-name"));
|
||||||
|
} else if (IS_MATCH_IPv6_NEXTHOP_LIST(condition)) {
|
||||||
assert(acl);
|
vty_out(vty, " match ipv6 next-hop %s\n",
|
||||||
|
yang_dnode_get_string(
|
||||||
if (IS_MATCH_IPv4_ADDRESS_LIST(condition))
|
dnode, "./rmap-match-condition/list-name"));
|
||||||
vty_out(vty, " match ip address %s\n", acl);
|
|
||||||
else if (IS_MATCH_IPv4_NEXTHOP_LIST(condition))
|
|
||||||
vty_out(vty, " match ip next-hop %s\n", acl);
|
|
||||||
else
|
|
||||||
vty_out(vty, " match ipv6 next-hop %s\n", acl);
|
|
||||||
} else if (IS_MATCH_IPv4_PREFIX_LIST(condition)) {
|
} else if (IS_MATCH_IPv4_PREFIX_LIST(condition)) {
|
||||||
vty_out(vty, " match ip address prefix-list %s\n",
|
vty_out(vty, " match ip address prefix-list %s\n",
|
||||||
yang_dnode_get_string(
|
yang_dnode_get_string(
|
||||||
@ -719,84 +714,40 @@ void route_map_condition_show(struct vty *vty, const struct lyd_node *dnode,
|
|||||||
dnode,
|
dnode,
|
||||||
"./rmap-match-condition/frr-bgp-route-map:list-name"));
|
"./rmap-match-condition/frr-bgp-route-map:list-name"));
|
||||||
} else if (IS_MATCH_ROUTE_SRC(condition)) {
|
} else if (IS_MATCH_ROUTE_SRC(condition)) {
|
||||||
acl = NULL;
|
vty_out(vty, " match ip route-source %s\n",
|
||||||
if ((ln = yang_dnode_get(
|
yang_dnode_get_string(
|
||||||
dnode,
|
dnode,
|
||||||
"./rmap-match-condition/frr-bgp-route-map:list-name"))
|
"./rmap-match-condition/frr-bgp-route-map:list-name"));
|
||||||
!= NULL)
|
|
||||||
acl = yang_dnode_get_string(ln, NULL);
|
|
||||||
|
|
||||||
assert(acl);
|
|
||||||
|
|
||||||
vty_out(vty, " match ip route-source %s\n", acl);
|
|
||||||
} else if (IS_MATCH_ROUTE_SRC_PL(condition)) {
|
} else if (IS_MATCH_ROUTE_SRC_PL(condition)) {
|
||||||
vty_out(vty, " match ip route-source prefix-list %s\n",
|
vty_out(vty, " match ip route-source prefix-list %s\n",
|
||||||
yang_dnode_get_string(
|
yang_dnode_get_string(
|
||||||
dnode,
|
dnode,
|
||||||
"./rmap-match-condition/frr-bgp-route-map:list-name"));
|
"./rmap-match-condition/frr-bgp-route-map:list-name"));
|
||||||
} else if (IS_MATCH_ROUTE_SRC(condition)) {
|
|
||||||
acl = NULL;
|
|
||||||
if ((ln = yang_dnode_get(
|
|
||||||
dnode,
|
|
||||||
"./rmap-match-condition/frr-bgp-route-map:list-name"))
|
|
||||||
!= NULL)
|
|
||||||
acl = yang_dnode_get_string(ln, NULL);
|
|
||||||
|
|
||||||
assert(acl);
|
|
||||||
|
|
||||||
vty_out(vty, " match ip route-source %s\n", acl);
|
|
||||||
} else if (IS_MATCH_COMMUNITY(condition)) {
|
} else if (IS_MATCH_COMMUNITY(condition)) {
|
||||||
acl = NULL;
|
vty_out(vty, " match community %s",
|
||||||
if ((ln = yang_dnode_get(
|
yang_dnode_get_string(
|
||||||
dnode,
|
dnode,
|
||||||
"./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name"))
|
"./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name"));
|
||||||
!= NULL) {
|
if (yang_dnode_get_bool(
|
||||||
acl = yang_dnode_get_string(ln, NULL);
|
dnode,
|
||||||
|
"./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name-exact-match"))
|
||||||
if (true
|
vty_out(vty, " exact-match");
|
||||||
== yang_dnode_get_bool(
|
vty_out(vty, "\n");
|
||||||
dnode,
|
|
||||||
"./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name-exact-match"))
|
|
||||||
vty_out(vty,
|
|
||||||
" match community %s exact-match\n",
|
|
||||||
acl);
|
|
||||||
else
|
|
||||||
vty_out(vty, " match community %s\n", acl);
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(acl);
|
|
||||||
} else if (IS_MATCH_LCOMMUNITY(condition)) {
|
} else if (IS_MATCH_LCOMMUNITY(condition)) {
|
||||||
acl = NULL;
|
vty_out(vty, " match large-community %s",
|
||||||
if ((ln = yang_dnode_get(
|
yang_dnode_get_string(
|
||||||
dnode,
|
dnode,
|
||||||
"./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name"))
|
"./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name"));
|
||||||
!= NULL) {
|
if (yang_dnode_get_bool(
|
||||||
acl = yang_dnode_get_string(ln, NULL);
|
dnode,
|
||||||
|
"./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name-exact-match"))
|
||||||
if (true
|
vty_out(vty, " exact-match");
|
||||||
== yang_dnode_get_bool(
|
vty_out(vty, "\n");
|
||||||
dnode,
|
|
||||||
"./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name-exact-match"))
|
|
||||||
vty_out(vty,
|
|
||||||
" match large-community %s exact-match\n",
|
|
||||||
acl);
|
|
||||||
else
|
|
||||||
vty_out(vty, " match large-community %s\n",
|
|
||||||
acl);
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(acl);
|
|
||||||
} else if (IS_MATCH_EXTCOMMUNITY(condition)) {
|
} else if (IS_MATCH_EXTCOMMUNITY(condition)) {
|
||||||
acl = NULL;
|
vty_out(vty, " match extcommunity %s\n",
|
||||||
if ((ln = yang_dnode_get(
|
yang_dnode_get_string(
|
||||||
dnode,
|
dnode,
|
||||||
"./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name"))
|
"./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name"));
|
||||||
!= NULL)
|
|
||||||
acl = yang_dnode_get_string(ln, NULL);
|
|
||||||
|
|
||||||
assert(acl);
|
|
||||||
|
|
||||||
vty_out(vty, " match extcommunity %s\n", acl);
|
|
||||||
} else if (IS_MATCH_IPV4_NH(condition)) {
|
} else if (IS_MATCH_IPV4_NH(condition)) {
|
||||||
vty_out(vty, " match ip next-hop address %s\n",
|
vty_out(vty, " match ip next-hop address %s\n",
|
||||||
yang_dnode_get_string(
|
yang_dnode_get_string(
|
||||||
|
Loading…
Reference in New Issue
Block a user