summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_nexthop.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-02-06 13:17:01 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2020-02-06 13:24:53 +0100
commitc4fb2504916ceb8bc48c0937ce9a42e42af8f4b6 (patch)
treecb8ba428bda4cdf53cf1b6c5de3b9ade23cd2ece /bgpd/bgp_nexthop.c
parentbgpd: Store data in final temp variable (diff)
downloadfrr-c4fb2504916ceb8bc48c0937ce9a42e42af8f4b6.tar.xz
frr-c4fb2504916ceb8bc48c0937ce9a42e42af8f4b6.zip
bgpd: Fix up some poor formatting
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_nexthop.c')
-rw-r--r--bgpd/bgp_nexthop.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c
index 49111ff8c..41a5577a7 100644
--- a/bgpd/bgp_nexthop.c
+++ b/bgpd/bgp_nexthop.c
@@ -477,8 +477,8 @@ int bgp_nexthop_self(struct bgp *bgp, afi_t afi, uint8_t type, uint8_t sub_type,
struct bgp_addr tmp_addr = {0}, *addr = NULL;
struct tip_addr tmp_tip, *tip = NULL;
- bool is_bgp_static_route = ((type == ZEBRA_ROUTE_BGP)
- && (sub_type == BGP_ROUTE_STATIC))
+ bool is_bgp_static_route =
+ ((type == ZEBRA_ROUTE_BGP) && (sub_type == BGP_ROUTE_STATIC))
? true
: false;
@@ -493,17 +493,14 @@ int bgp_nexthop_self(struct bgp *bgp, afi_t afi, uint8_t type, uint8_t sub_type,
tmp_addr.p.prefixlen = rn->p.prefixlen;
} else {
/* Here we need to find out which nexthop to be used*/
- if (attr->flag &
- ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP)) {
-
+ if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP)) {
tmp_addr.p.u.prefix4 = attr->nexthop;
tmp_addr.p.prefixlen = IPV4_MAX_BITLEN;
-
- } else if ((attr->mp_nexthop_len) &&
- ((attr->mp_nexthop_len ==
- BGP_ATTR_NHLEN_IPV4) ||
- (attr->mp_nexthop_len ==
- BGP_ATTR_NHLEN_VPNV4))) {
+ } else if ((attr->mp_nexthop_len)
+ && ((attr->mp_nexthop_len
+ == BGP_ATTR_NHLEN_IPV4)
+ || (attr->mp_nexthop_len
+ == BGP_ATTR_NHLEN_VPNV4))) {
tmp_addr.p.u.prefix4 =
attr->mp_nexthop_global_in;
tmp_addr.p.prefixlen = IPV4_MAX_BITLEN;