mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 23:21:22 +03:00
sd-netlink: do not set action for RTM_GETRULE message
Otherwise, when NETLINK_GET_STRICT_CHK socket option is enabled, no rule will be dumped.
This commit is contained in:
parent
f318f64388
commit
3ca619061d
@ -858,7 +858,6 @@ int sd_rtnl_message_new_routing_policy_rule(sd_netlink *rtnl, sd_netlink_message
|
||||
|
||||
frh = NLMSG_DATA((*ret)->hdr);
|
||||
frh->family = ifal_family;
|
||||
frh->action = FR_ACT_TO_TBL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -508,11 +508,9 @@ static int routing_policy_rule_set_netlink_message(const RoutingPolicyRule *rule
|
||||
return log_link_error_errno(link, r, "Could not append FRA_SUPPRESS_PREFIXLEN attribute: %m");
|
||||
}
|
||||
|
||||
if (rule->type != FR_ACT_TO_TBL) {
|
||||
r = sd_rtnl_message_routing_policy_rule_set_fib_type(m, rule->type);
|
||||
if (r < 0)
|
||||
return log_link_error_errno(link, r, "Could not append FIB rule type attribute: %m");
|
||||
}
|
||||
r = sd_rtnl_message_routing_policy_rule_set_fib_type(m, rule->type);
|
||||
if (r < 0)
|
||||
return log_link_error_errno(link, r, "Could not append FIB rule type attribute: %m");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user