summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_attr.c5
-rw-r--r--bgpd/bgp_route.c2
-rw-r--r--bgpd/rfapi/bgp_rfapi_cfg.c2
-rw-r--r--bgpd/rfapi/rfapi_vty.c4
-rw-r--r--bgpd/rfapi/vnc_export_bgp.c41
5 files changed, 34 insertions, 20 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index e5f85f7395..83ffcc5558 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -1638,7 +1638,10 @@ int bgp_mp_reach_parse(struct bgp_attr_parser_args *args,
case BGP_ATTR_NHLEN_VPNV4:
stream_getl(s); /* RD high */
stream_getl(s); /* RD low */
- /* NOTE: intentional fall through - for consistency in rx processing */
+ /*
+ * NOTE: intentional fall through
+ * - for consistency in rx processing
+ */
case BGP_ATTR_NHLEN_IPV4:
stream_get(&attr->mp_nexthop_global_in, s, IPV4_MAX_BYTELEN);
/* Probably needed for RFC 2283 */
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 2753295f47..4ee1aafbe9 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -2788,7 +2788,7 @@ int bgp_update(struct peer *peer, struct prefix *p, u_int32_t addpath_id,
}
/* next hop check. */
- if (!CHECK_FLAG(peer->flags, PEER_FLAG_IS_RFAPI_HD) && /* allow vpn->vrf import */
+ if (!CHECK_FLAG(peer->flags, PEER_FLAG_IS_RFAPI_HD) &&
bgp_update_martian_nexthop(bgp, afi, safi, &new_attr)) {
reason = "martian or self next-hop;";
bgp_attr_flush(&new_attr);
diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c
index b1899ec6ae..3ecc4be94e 100644
--- a/bgpd/rfapi/bgp_rfapi_cfg.c
+++ b/bgpd/rfapi/bgp_rfapi_cfg.c
@@ -1752,7 +1752,7 @@ DEFUN (vnc_nve_group_export_no_routemap,
is_bgp = 0;
/* fall thru */
case 'b':
- idx +=2;
+ idx += 2;
break;
default: /* route-map */
idx++;
diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c
index 953ea739dc..6af99278bc 100644
--- a/bgpd/rfapi/rfapi_vty.c
+++ b/bgpd/rfapi/rfapi_vty.c
@@ -4634,10 +4634,10 @@ notcfg:
************************************************************************/
void vnc_add_vrf_opener(struct bgp *bgp, struct rfapi_nve_group_cfg *rfg)
{
- if (rfg->rfd == NULL) /* need new rfapi_handle */
- {
+ if (rfg->rfd == NULL) { /* need new rfapi_handle */
/* based on rfapi_open */
struct rfapi_descriptor *rfd;
+
rfd = XCALLOC(MTYPE_RFAPI_DESC,
sizeof(struct rfapi_descriptor));
rfd->bgp = bgp;
diff --git a/bgpd/rfapi/vnc_export_bgp.c b/bgpd/rfapi/vnc_export_bgp.c
index 268adcbfde..b348c399bf 100644
--- a/bgpd/rfapi/vnc_export_bgp.c
+++ b/bgpd/rfapi/vnc_export_bgp.c
@@ -779,7 +779,11 @@ void vnc_direct_bgp_add_prefix(struct bgp *bgp,
if (rfgn->rfg->type == RFAPI_GROUP_CFG_VRF) {
vnc_direct_add_rn_group_rd(bgp, rfgn->rfg, rn, &attr,
afi, rfgn->rfg->rfd);
- continue; /* yuck! - but consistent with rest of function */
+ /*
+ * yuck!
+ * - but consistent with rest of function
+ */
+ continue;
}
/*
* For each NVE that is assigned to the export nve group,
@@ -880,7 +884,11 @@ void vnc_direct_bgp_del_prefix(struct bgp *bgp,
BGP_ROUTE_REDISTRIBUTE,
NULL, /* RD not used for unicast */
NULL, NULL); /* tag not used for unicast */
- continue; /* yuck! - but consistent with rest of function */
+ /*
+ * yuck!
+ * - but consistent with rest of function
+ */
+ continue;
}
/*
* For each NVE that is assigned to the export nve group,
@@ -1161,7 +1169,7 @@ static void vnc_direct_add_rn_group_rd(struct bgp *bgp,
if (irfd == NULL && rfg->type != RFAPI_GROUP_CFG_VRF) {
/* need new rfapi_handle, for peer strcture
* -- based on vnc_add_vrf_prefi */
- assert (rfg->rfd == NULL);
+ assert(rfg->rfd == NULL);
if (!rfg->rt_export_list || !rfg->rfapi_import_table) {
vnc_zlog_debug_verbose("%s: VRF \"%s\" is missing RT import/export configuration.\n",
@@ -1183,8 +1191,10 @@ static void vnc_direct_add_rn_group_rd(struct bgp *bgp,
sizeof(struct rfapi_descriptor));
irfd->bgp = bgp;
rfg->rfd = irfd;
- /* leave most fields empty as will get from (dynamic) config
- * when needed */
+ /*
+ * leave most fields empty as will get from (dynamic) config
+ * when needed
+ */
irfd->default_tunneltype_option.type = BGP_ENCAP_TYPE_MPLS;
irfd->cookie = rfg;
if (rfg->vn_prefix.family
@@ -1224,23 +1234,21 @@ static void vnc_direct_add_rn_group_rd(struct bgp *bgp,
if (rfg->routemap_export_bgp) {
route_map_result_t ret;
+
info.peer = irfd->peer;
info.attr = &hattr;
- ret = route_map_apply(
- rfg->routemap_export_bgp,
+ ret = route_map_apply(rfg->routemap_export_bgp,
&rn->p, RMAP_BGP, &info);
if (ret == RMAP_DENYMATCH) {
bgp_attr_flush(&hattr);
- vnc_zlog_debug_verbose(
- "%s: route map says DENY, so not calling bgp_update",
+ vnc_zlog_debug_verbose("%s: route map says DENY, so not calling bgp_update",
__func__);
return;
}
}
if (VNC_DEBUG(EXPORT_BGP_DIRECT_ADD)) {
- vnc_zlog_debug_any(
- "%s: hattr after route_map_apply:",
+ vnc_zlog_debug_any("%s: hattr after route_map_apply:",
__func__);
rfapiPrintAttrPtrs(NULL, &hattr);
}
@@ -1321,7 +1329,11 @@ static void vnc_direct_bgp_add_group_afi(struct bgp *bgp,
if (rfg->type == RFAPI_GROUP_CFG_VRF) {
vnc_direct_add_rn_group_rd(bgp, rfg, rn, &attr,
afi, rfg->rfd);
- continue; /* yuck! - but consistent with rest of function */
+ /*
+ * yuck!
+ * - but consistent with rest of function
+ */
+ continue;
}
/*
* For each NVE that is assigned to the export nve
@@ -1331,7 +1343,7 @@ static void vnc_direct_bgp_add_group_afi(struct bgp *bgp,
for (ln = listhead(rfg->nves); ln;
ln = listnextnode(ln)) {
vnc_direct_add_rn_group_rd(bgp, rfg, rn, &attr,
- afi, listgetdata(ln));
+ afi, listgetdata(ln));
}
}
}
@@ -1418,12 +1430,11 @@ static void vnc_direct_bgp_del_group_afi(struct bgp *bgp,
for (ln = listhead(rfg->nves); ln;
ln = listnextnode(ln))
vnc_direct_del_rn_group_rd(bgp, rfg, rn,
- afi, listgetdata(ln));
+ afi, listgetdata(ln));
}
}
}
-
/*
* Caller is responsible for ensuring that the specified nve-group
* was actually part of the list of exported nve groups.