summaryrefslogtreecommitdiff
path: root/bgpd/bgp_flowspec_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_flowspec_vty.c')
-rw-r--r--bgpd/bgp_flowspec_vty.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/bgpd/bgp_flowspec_vty.c b/bgpd/bgp_flowspec_vty.c
index 7df1423e59..d4ccca84bb 100644
--- a/bgpd/bgp_flowspec_vty.c
+++ b/bgpd/bgp_flowspec_vty.c
@@ -355,7 +355,8 @@ void route_vty_out_flowspec(struct vty *vty, const struct prefix *p,
bgp_path_info_extra_get(path);
bool list_began = false;
- if (extra->bgp_fs_pbr && listcount(extra->bgp_fs_pbr)) {
+ if (extra->flowspec && extra->flowspec->bgp_fs_pbr &&
+ listcount(extra->flowspec->bgp_fs_pbr)) {
struct listnode *node;
struct bgp_pbr_match_entry *bpme;
struct bgp_pbr_match *bpm;
@@ -363,8 +364,8 @@ void route_vty_out_flowspec(struct vty *vty, const struct prefix *p,
list_bpm = list_new();
vty_out(vty, "\tinstalled in PBR");
- for (ALL_LIST_ELEMENTS_RO(extra->bgp_fs_pbr,
- node, bpme)) {
+ for (ALL_LIST_ELEMENTS_RO(extra->flowspec->bgp_fs_pbr, node,
+ bpme)) {
bpm = bpme->backpointer;
if (listnode_lookup(list_bpm, bpm))
continue;
@@ -378,13 +379,14 @@ void route_vty_out_flowspec(struct vty *vty, const struct prefix *p,
}
list_delete(&list_bpm);
}
- if (extra->bgp_fs_iprule && listcount(extra->bgp_fs_iprule)) {
+ if (extra->flowspec && extra->flowspec->bgp_fs_iprule &&
+ listcount(extra->flowspec->bgp_fs_iprule)) {
struct listnode *node;
struct bgp_pbr_rule *bpr;
if (!list_began)
vty_out(vty, "\tinstalled in PBR");
- for (ALL_LIST_ELEMENTS_RO(extra->bgp_fs_iprule,
+ for (ALL_LIST_ELEMENTS_RO(extra->flowspec->bgp_fs_iprule,
node, bpr)) {
if (!bpr->action)
continue;
@@ -545,7 +547,7 @@ static int bgp_fs_local_install_interface(struct bgp *bgp,
return CMD_SUCCESS;
pbr_if = XCALLOC(MTYPE_TMP,
sizeof(struct bgp_pbr_interface));
- strlcpy(pbr_if->name, ifname, INTERFACE_NAMSIZ);
+ strlcpy(pbr_if->name, ifname, IFNAMSIZ);
RB_INSERT(bgp_pbr_interface_head, head, pbr_if);
*bgp_pbr_interface_any = false;
} else {