diff options
author | Lou Berger <lberger@labn.net> | 2018-03-06 20:02:52 +0100 |
---|---|---|
committer | Lou Berger <lberger@labn.net> | 2018-03-06 20:04:32 +0100 |
commit | 996c93142d3abfab0f6d6c800474e22a8cfbdbc5 (patch) | |
tree | 2b28846d256c84cf7b7f1a8988fb3267c8611722 /ripd | |
parent | bgpd: another change to keep indent.py happy (diff) | |
download | frr-996c93142d3abfab0f6d6c800474e22a8cfbdbc5.tar.xz frr-996c93142d3abfab0f6d6c800474e22a8cfbdbc5.zip |
*: conform with COMMUNITY.md formatting rules, via 'make indent'
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to 'ripd')
-rw-r--r-- | ripd/rip_interface.c | 14 | ||||
-rw-r--r-- | ripd/rip_routemap.c | 15 | ||||
-rw-r--r-- | ripd/rip_zebra.c | 3 | ||||
-rw-r--r-- | ripd/ripd.c | 26 | ||||
-rw-r--r-- | ripd/ripd.h | 8 |
5 files changed, 28 insertions, 38 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index d20954037..3a773f245 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -907,19 +907,17 @@ static void rip_connect_set(struct interface *ifp, int set) * "network IF_OR_PREF" one */ if ((rip_enable_if_lookup(connected->ifp->name) >= 0) || (rip_enable_network_lookup2(connected) >= 0)) - rip_redistribute_add( - ZEBRA_ROUTE_CONNECT, - RIP_ROUTE_INTERFACE, &address, - &nh, 0, 0, 0); + rip_redistribute_add(ZEBRA_ROUTE_CONNECT, + RIP_ROUTE_INTERFACE, + &address, &nh, 0, 0, 0); } else { rip_redistribute_delete(ZEBRA_ROUTE_CONNECT, RIP_ROUTE_INTERFACE, &address, connected->ifp->ifindex); if (rip_redistribute_check(ZEBRA_ROUTE_CONNECT)) - rip_redistribute_add( - ZEBRA_ROUTE_CONNECT, - RIP_ROUTE_REDISTRIBUTE, &address, - &nh, 0, 0, 0); + rip_redistribute_add(ZEBRA_ROUTE_CONNECT, + RIP_ROUTE_REDISTRIBUTE, + &address, &nh, 0, 0, 0); } } } diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c index a37effa23..40e7ed915 100644 --- a/ripd/rip_routemap.c +++ b/ripd/rip_routemap.c @@ -170,9 +170,8 @@ static route_map_result_t route_match_ip_next_hop(void *rule, if (type == RMAP_RIP) { rinfo = object; p.family = AF_INET; - p.prefix = - (rinfo->nh.gate.ipv4.s_addr) ? - rinfo->nh.gate.ipv4 : rinfo->from; + p.prefix = (rinfo->nh.gate.ipv4.s_addr) ? rinfo->nh.gate.ipv4 + : rinfo->from; p.prefixlen = IPV4_MAX_BITLEN; alist = access_list_lookup(AFI_IP, (char *)rule); @@ -217,9 +216,8 @@ route_match_ip_next_hop_prefix_list(void *rule, struct prefix *prefix, if (type == RMAP_RIP) { rinfo = object; p.family = AF_INET; - p.prefix = - (rinfo->nh.gate.ipv4.s_addr) ? - rinfo->nh.gate.ipv4 : rinfo->from; + p.prefix = (rinfo->nh.gate.ipv4.s_addr) ? rinfo->nh.gate.ipv4 + : rinfo->from; p.prefixlen = IPV4_MAX_BITLEN; plist = prefix_list_lookup(AFI_IP, (char *)rule); @@ -427,8 +425,9 @@ static void *route_set_metric_compile(const char *arg) return mod; } if (metric > RIP_METRIC_INFINITY) { - zlog_info("%s: Metric specified: %ld is greater than RIP_METRIC_INFINITY, using INFINITY instead", - __PRETTY_FUNCTION__, metric); + zlog_info( + "%s: Metric specified: %ld is greater than RIP_METRIC_INFINITY, using INFINITY instead", + __PRETTY_FUNCTION__, metric); mod->metric = RIP_METRIC_INFINITY; } else mod->metric = metric; diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c index 4f02daed4..dc972981b 100644 --- a/ripd/rip_zebra.c +++ b/ripd/rip_zebra.c @@ -139,8 +139,7 @@ static int rip_zebra_read_route(int command, struct zclient *zclient, if (command == ZEBRA_REDISTRIBUTE_ROUTE_ADD) rip_redistribute_add(api.type, RIP_ROUTE_REDISTRIBUTE, (struct prefix_ipv4 *)&api.prefix, &nh, - api.metric, api.distance, - api.tag); + api.metric, api.distance, api.tag); else if (command == ZEBRA_REDISTRIBUTE_ROUTE_DEL) rip_redistribute_delete(api.type, RIP_ROUTE_REDISTRIBUTE, (struct prefix_ipv4 *)&api.prefix, diff --git a/ripd/ripd.c b/ripd/ripd.c index 9a1325042..7575c8e1f 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -451,9 +451,8 @@ static void rip_rte_process(struct rte *rte, struct sockaddr_in *from, /* Get back the object */ rte->nexthop = newinfo.nexthop_out; rte->tag = htons(newinfo.tag_out); /* XXX */ - rte->metric = - newinfo.metric_out; /* XXX: the routemap uses the - metric_out field */ + rte->metric = newinfo.metric_out; /* XXX: the routemap uses the + metric_out field */ } /* Once the entry has been validated, update the metric by @@ -1463,9 +1462,8 @@ static int rip_send_packet(u_char *buf, int size, struct sockaddr_in *to, /* Add redistributed route to RIP table. */ void rip_redistribute_add(int type, int sub_type, struct prefix_ipv4 *p, - struct nexthop *nh, - unsigned int metric, unsigned char distance, - route_tag_t tag) + struct nexthop *nh, unsigned int metric, + unsigned char distance, route_tag_t tag) { int ret; struct route_node *rp = NULL; @@ -1518,9 +1516,8 @@ void rip_redistribute_add(int type, int sub_type, struct prefix_ipv4 *p, (void)rip_ecmp_add(&newinfo); if (IS_RIP_DEBUG_EVENT) { - zlog_debug( - "Redistribute new prefix %s/%d", - inet_ntoa(p->prefix), p->prefixlen); + zlog_debug("Redistribute new prefix %s/%d", + inet_ntoa(p->prefix), p->prefixlen); } rip_event(RIP_TRIGGERED_UPDATE, 0); @@ -2319,15 +2316,14 @@ void rip_output_process(struct connected *ifc, struct sockaddr_in *to, tmp_rinfo)) if (tmp_rinfo->type == ZEBRA_ROUTE_RIP && tmp_rinfo->nh.ifindex - == ifc->ifp->ifindex) + == ifc->ifp->ifindex) tmp_rinfo->metric_out = RIP_METRIC_INFINITY; if (rinfo->type == ZEBRA_ROUTE_CONNECT && prefix_match((struct prefix *)p, ifc->address)) - rinfo->metric_out = - RIP_METRIC_INFINITY; + rinfo->metric_out = RIP_METRIC_INFINITY; } /* Prepare preamble, auth headers, if needs be */ @@ -2881,8 +2877,8 @@ DEFUN (rip_route, node->info = (void *)1; - rip_redistribute_add(ZEBRA_ROUTE_RIP, RIP_ROUTE_STATIC, &p, &nh, 0, - 0, 0); + rip_redistribute_add(ZEBRA_ROUTE_RIP, RIP_ROUTE_STATIC, &p, &nh, 0, 0, + 0); return CMD_SUCCESS; } @@ -3453,7 +3449,7 @@ DEFUN (show_ip_rip, if (len > 0) vty_out(vty, "%*s", len, " "); - switch(rinfo->nh.type) { + switch (rinfo->nh.type) { case NEXTHOP_TYPE_IPV4: case NEXTHOP_TYPE_IPV4_IFINDEX: vty_out(vty, "%-20s %2d ", diff --git a/ripd/ripd.h b/ripd/ripd.h index 9a9c081bf..abbc3a79e 100644 --- a/ripd/ripd.h +++ b/ripd/ripd.h @@ -385,11 +385,9 @@ extern int rip_request_send(struct sockaddr_in *, struct interface *, u_char, extern int rip_neighbor_lookup(struct sockaddr_in *); extern int rip_redistribute_check(int); -extern void rip_redistribute_add(int type, int sub_type, - struct prefix_ipv4 *p, - struct nexthop *nh, - unsigned int metric, unsigned char distance, - route_tag_t tag); +extern void rip_redistribute_add(int type, int sub_type, struct prefix_ipv4 *p, + struct nexthop *nh, unsigned int metric, + unsigned char distance, route_tag_t tag); extern void rip_redistribute_delete(int, int, struct prefix_ipv4 *, ifindex_t); extern void rip_redistribute_withdraw(int); extern void rip_zebra_ipv4_add(struct route_node *); |