Set the destination address of a rule
- rule rule to change
- dst new destination address
Assigns the new destination address to the specified rule handle. The address is validated against the address family if set already via either rtnl_rule_set_family()
or by setting one of the other addresses. The assignment fails if the address families mismatch. In case the address family has not been specified yet, the address family of this new address is elected to be the requirement.
- 0 on success or a negative error code.
Definition at line 819 of file rule.c.
return __assign_addr(rule, &rule->r_dst, dst, &rule->r_dst_len,
RULE_ATTR_DST | RULE_ATTR_DST_LEN);