Set the source address of a rule
- rule rule to change
- src new source address
Assigns the new source 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 786 of file rule.c.
return __assign_addr(rule, &rule->r_src, src, &rule->r_src_len,
RULE_ATTR_SRC | RULE_ATTR_SRC_LEN);