summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-05-11 05:36:15 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-05-11 08:30:39 +0200
commit27efb52bc660b1cae600f56365da5dfd06400589 (patch)
tree3eaf344ae7444da28b1b77932e9c0f54319ca34e /src/network
parenttmpfiles: remove newline that shouldn't be there (diff)
downloadsystemd-27efb52bc660b1cae600f56365da5dfd06400589.tar.xz
systemd-27efb52bc660b1cae600f56365da5dfd06400589.zip
network: fix indentation
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-route.c228
1 files changed, 124 insertions, 104 deletions
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 3c5127bb88..fd4bd65a0e 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -310,8 +310,7 @@ int route_add_foreign(
return route_add_internal(link, &link->routes_foreign, family, dst, dst_prefixlen, tos, priority, table, ret);
}
-int route_add(
- Link *link,
+int route_add(Link *link,
int family,
const union in_addr_union *dst,
unsigned char dst_prefixlen,
@@ -353,13 +352,13 @@ int route_add(
}
void route_update(Route *route,
- const union in_addr_union *src,
- unsigned char src_prefixlen,
- const union in_addr_union *gw,
- const union in_addr_union *prefsrc,
- unsigned char scope,
- unsigned char protocol,
- unsigned char type) {
+ const union in_addr_union *src,
+ unsigned char src_prefixlen,
+ const union in_addr_union *gw,
+ const union in_addr_union *prefsrc,
+ unsigned char scope,
+ unsigned char protocol,
+ unsigned char type) {
assert(route);
assert(src);
@@ -376,7 +375,8 @@ void route_update(Route *route,
}
int route_remove(Route *route, Link *link,
- sd_netlink_message_handler_t callback) {
+ sd_netlink_message_handler_t callback) {
+
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
int r;
@@ -677,7 +677,8 @@ int route_configure(
return 0;
}
-int config_parse_gateway(const char *unit,
+int config_parse_gateway(
+ const char *unit,
const char *filename,
unsigned line,
const char *section,
@@ -722,7 +723,8 @@ int config_parse_gateway(const char *unit,
return 0;
}
-int config_parse_preferred_src(const char *unit,
+int config_parse_preferred_src(
+ const char *unit,
const char *filename,
unsigned line,
const char *section,
@@ -762,7 +764,8 @@ int config_parse_preferred_src(const char *unit,
return 0;
}
-int config_parse_destination(const char *unit,
+int config_parse_destination(
+ const char *unit,
const char *filename,
unsigned line,
const char *section,
@@ -817,16 +820,18 @@ int config_parse_destination(const char *unit,
return 0;
}
-int config_parse_route_priority(const char *unit,
- const char *filename,
- unsigned line,
- const char *section,
- unsigned section_line,
- const char *lvalue,
- int ltype,
- const char *rvalue,
- void *data,
- void *userdata) {
+int config_parse_route_priority(
+ const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ unsigned section_line,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata) {
+
Network *network = userdata;
_cleanup_(route_freep) Route *n = NULL;
uint32_t k;
@@ -855,16 +860,18 @@ int config_parse_route_priority(const char *unit,
return 0;
}
-int config_parse_route_scope(const char *unit,
- const char *filename,
- unsigned line,
- const char *section,
- unsigned section_line,
- const char *lvalue,
- int ltype,
- const char *rvalue,
- void *data,
- void *userdata) {
+int config_parse_route_scope(
+ const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ unsigned section_line,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata) {
+
Network *network = userdata;
_cleanup_(route_freep) Route *n = NULL;
int r;
@@ -895,16 +902,18 @@ int config_parse_route_scope(const char *unit,
return 0;
}
-int config_parse_route_table(const char *unit,
- const char *filename,
- unsigned line,
- const char *section,
- unsigned section_line,
- const char *lvalue,
- int ltype,
- const char *rvalue,
- void *data,
- void *userdata) {
+int config_parse_route_table(
+ const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ unsigned section_line,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata) {
+
_cleanup_(route_freep) Route *n = NULL;
Network *network = userdata;
uint32_t k;
@@ -928,22 +937,23 @@ int config_parse_route_table(const char *unit,
}
n->table = k;
-
n = NULL;
return 0;
}
-int config_parse_gateway_onlink(const char *unit,
- const char *filename,
- unsigned line,
- const char *section,
- unsigned section_line,
- const char *lvalue,
- int ltype,
- const char *rvalue,
- void *data,
- void *userdata) {
+int config_parse_gateway_onlink(
+ const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ unsigned section_line,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata) {
+
Network *network = userdata;
_cleanup_(route_freep) Route *n = NULL;
int r;
@@ -971,16 +981,18 @@ int config_parse_gateway_onlink(const char *unit,
return 0;
}
-int config_parse_ipv6_route_preference(const char *unit,
- const char *filename,
- unsigned line,
- const char *section,
- unsigned section_line,
- const char *lvalue,
- int ltype,
- const char *rvalue,
- void *data,
- void *userdata) {
+int config_parse_ipv6_route_preference(
+ const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ unsigned section_line,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata) {
+
Network *network = userdata;
_cleanup_(route_freep) Route *n = NULL;
int r;
@@ -1005,16 +1017,18 @@ int config_parse_ipv6_route_preference(const char *unit,
return 0;
}
-int config_parse_route_protocol(const char *unit,
- const char *filename,
- unsigned line,
- const char *section,
- unsigned section_line,
- const char *lvalue,
- int ltype,
- const char *rvalue,
- void *data,
- void *userdata) {
+int config_parse_route_protocol(
+ const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ unsigned section_line,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata) {
+
Network *network = userdata;
_cleanup_(route_freep) Route *n = NULL;
int r;
@@ -1042,16 +1056,18 @@ int config_parse_route_protocol(const char *unit,
return 0;
}
-int config_parse_route_type(const char *unit,
- const char *filename,
- unsigned line,
- const char *section,
- unsigned section_line,
- const char *lvalue,
- int ltype,
- const char *rvalue,
- void *data,
- void *userdata) {
+int config_parse_route_type(
+ const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ unsigned section_line,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata) {
+
Network *network = userdata;
_cleanup_(route_freep) Route *n = NULL;
int r;
@@ -1078,16 +1094,18 @@ int config_parse_route_type(const char *unit,
return 0;
}
-int config_parse_tcp_window(const char *unit,
- const char *filename,
- unsigned line,
- const char *section,
- unsigned section_line,
- const char *lvalue,
- int ltype,
- const char *rvalue,
- void *data,
- void *userdata) {
+int config_parse_tcp_window(
+ const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ unsigned section_line,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata) {
+
_cleanup_(route_freep) Route *n = NULL;
Network *network = userdata;
uint64_t k;
@@ -1124,16 +1142,18 @@ int config_parse_tcp_window(const char *unit,
return 0;
}
-int config_parse_quickack(const char *unit,
- const char *filename,
- unsigned line,
- const char *section,
- unsigned section_line,
- const char *lvalue,
- int ltype,
- const char *rvalue,
- void *data,
- void *userdata) {
+int config_parse_quickack(
+ const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ unsigned section_line,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata) {
+
_cleanup_(route_freep) Route *n = NULL;
Network *network = userdata;
int k, r;