[PATCH libnl 2/2] rule: Add support for l3mdev in FIB rules

David Ahern dsahern at gmail.com
Thu May 4 13:21:10 PDT 2017


On 5/3/17 8:15 PM, David Ahern wrote:
> On 5/3/17 5:21 PM, David Ahern wrote:
>> @@ -691,6 +706,17 @@ uint8_t rtnl_rule_get_action(struct rtnl_rule *rule)
>>  	return rule->r_action;
>>  }
>>  
>> +void rtnl_rule_set_l3mdev(struct rtnl_rule *rule)
>> +{
>> +	rule->r_l3mdev = 1;
>> +	rule->ce_mask |= RULE_ATTR_L3MDEV;
>> +}
>> +
>> +uint8_t rtnl_rule_get_l3mdev(struct rtnl_rule *rule)
>> +{
>> +	return rule->r_l3mdev;
>> +}
>> +
> 
> Oops, meant to update that to the form:
>    int rtnl_rule_get_l3mdev(struct rtnl_rule *rule, uint8_t *val)
> 
> Will resend tomorrow
> 

Actually, now I recall why I did it this way ... it is consistent with
the other get methods for rtnl_rule.

Thomas: which would you prefer - this variant:
    int rtnl_rule_get_l3mdev(struct rtnl_rule *rule, uint8_t *val)

or consistency with the existing rtnl_rule code which means
    uint8_t rtnl_rule_get_l3mdev(struct rtnl_rule *rule)



More information about the libnl mailing list