void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
- r = safe_atou8(rvalue, &n->tos);
+ r = safe_atou8(rvalue, &rule->tos);
if (r < 0) {
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse RPDB rule TOS, ignoring: %s", rvalue);
return 0;
}
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
if (isempty(rvalue)) {
- n->priority = 0;
- n->priority_set = false;
- TAKE_PTR(n);
+ rule->priority = 0;
+ rule->priority_set = false;
+ TAKE_PTR(rule);
return 0;
}
- r = safe_atou32(rvalue, &n->priority);
+ r = safe_atou32(rvalue, &rule->priority);
if (r < 0) {
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse RPDB rule priority, ignoring: %s", rvalue);
return 0;
}
- n->priority_set = true;
+ rule->priority_set = true;
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = ASSERT_PTR(userdata);
uint32_t priority;
int r;
assert(lvalue);
assert(rvalue);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
return 0;
}
- n->type = FR_ACT_GOTO;
- n->priority_goto = priority;
+ rule->type = FR_ACT_GOTO;
+ rule->priority_goto = priority;
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
- r = manager_get_route_table_from_string(network->manager, rvalue, &n->table);
+ r = manager_get_route_table_from_string(network->manager, rvalue, &rule->table);
if (r < 0) {
log_syntax(unit, LOG_WARNING, filename, line, r,
"Could not parse RPDB rule route table \"%s\", ignoring assignment: %m", rvalue);
return 0;
}
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
- r = parse_fwmark_fwmask(rvalue, &n->fwmark, &n->fwmask);
+ r = parse_fwmark_fwmask(rvalue, &rule->fwmark, &rule->fwmask);
if (r < 0) {
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse RPDB rule firewall mark or mask, ignoring: %s", rvalue);
return 0;
}
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
union in_addr_union *buffer;
uint8_t *prefixlen;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
if (streq(lvalue, "To")) {
- buffer = &n->to;
- prefixlen = &n->to_prefixlen;
+ buffer = &rule->to;
+ prefixlen = &rule->to_prefixlen;
} else {
- buffer = &n->from;
- prefixlen = &n->from_prefixlen;
+ buffer = &rule->from;
+ prefixlen = &rule->from_prefixlen;
}
- if (n->family == AF_UNSPEC)
- r = in_addr_prefix_from_string_auto(rvalue, &n->family, buffer, prefixlen);
+ if (rule->family == AF_UNSPEC)
+ r = in_addr_prefix_from_string_auto(rvalue, &rule->family, buffer, prefixlen);
else
- r = in_addr_prefix_from_string(rvalue, n->family, buffer, prefixlen);
+ r = in_addr_prefix_from_string(rvalue, rule->family, buffer, prefixlen);
if (r < 0) {
log_syntax(unit, LOG_WARNING, filename, line, r, "RPDB rule prefix is invalid, ignoring assignment: %s", rvalue);
return 0;
}
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
return 0;
}
- r = free_and_strdup(streq(lvalue, "IncomingInterface") ? &n->iif : &n->oif, rvalue);
+ r = free_and_strdup(streq(lvalue, "IncomingInterface") ? &rule->iif : &rule->oif, rvalue);
if (r < 0)
return log_oom();
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
uint16_t low, high;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
}
if (streq(lvalue, "SourcePort")) {
- n->sport.start = low;
- n->sport.end = high;
+ rule->sport.start = low;
+ rule->sport.end = high;
} else {
- n->dport.start = low;
- n->dport.end = high;
+ rule->dport.start = low;
+ rule->dport.end = high;
}
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
return 0;
}
- n->ipproto = r;
+ rule->ipproto = r;
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
return 0;
}
- SET_FLAG(n->flags, FIB_RULE_INVERT, r);
+ SET_FLAG(rule->flags, FIB_RULE_INVERT, r);
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
return 0;
}
- n->l3mdev = r;
+ rule->l3mdev = r;
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
AddressFamily a;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
return 0;
}
- n->address_family = a;
+ rule->address_family = a;
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
uid_t start, end;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
}
}
- n->uid_range.start = start;
- n->uid_range.end = end;
+ rule->uid_range.start = start;
+ rule->uid_range.end = end;
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
- r = parse_ip_prefix_length(rvalue, &n->suppress_prefixlen);
+ r = parse_ip_prefix_length(rvalue, &rule->suppress_prefixlen);
if (r == -ERANGE) {
log_syntax(unit, LOG_WARNING, filename, line, r, "Prefix length outside of valid range 0-128, ignoring: %s", rvalue);
return 0;
return 0;
}
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
int32_t suppress_ifgroup;
int r;
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
if (isempty(rvalue)) {
- n->suppress_ifgroup = -1;
+ rule->suppress_ifgroup = -1;
return 0;
}
"Value of SuppressInterfaceGroup= must be in the range 0…2147483647, ignoring assignment: %s", rvalue);
return 0;
}
- n->suppress_ifgroup = suppress_ifgroup;
- TAKE_PTR(n);
+ rule->suppress_ifgroup = suppress_ifgroup;
+ TAKE_PTR(rule);
return 0;
}
void *data,
void *userdata) {
- _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *n = NULL;
+ _cleanup_(routing_policy_rule_unref_or_set_invalidp) RoutingPolicyRule *rule = NULL;
Network *network = userdata;
- int r, t;
+ int r;
assert(filename);
assert(section);
assert(rvalue);
assert(data);
- r = routing_policy_rule_new_static(network, filename, section_line, &n);
+ r = routing_policy_rule_new_static(network, filename, section_line, &rule);
if (r < 0)
return log_oom();
- t = fr_act_type_from_string(rvalue);
- if (t < 0) {
- log_syntax(unit, LOG_WARNING, filename, line, t,
+ r = fr_act_type_from_string(rvalue);
+ if (r < 0) {
+ log_syntax(unit, LOG_WARNING, filename, line, r,
"Could not parse FIB rule type \"%s\", ignoring assignment: %m", rvalue);
return 0;
}
- n->type = (uint8_t) t;
+ rule->type = (uint8_t) r;
- TAKE_PTR(n);
+ TAKE_PTR(rule);
return 0;
}