Routing rules: Mask value for firewall mark
Thomas Graf
tgraf at infradead.org
Fri Oct 29 06:52:36 EDT 2010
On Fri, Oct 29, 2010 at 05:51:10AM -0400, Thomas Graf wrote:
> On Fri, Oct 29, 2010 at 12:58:56AM -0700, Joerg Pommnitz wrote:
> > Just wait a bit! rtnl_rule_get_mark ??
> >
> > But this was already there:
> > void rtnl_rule_set_mark (struct rtnl_rule *rule, uint64_t mark)
> > uint64_t rtnl_rule_get_mark (struct rtnl_rule *rule)
> >
> > The problem was the missing *MASK* value.
>
> It must have been late :-) I see what happened. libnl still uses the
> old RTA_* symbols while I changed the kernel fib rule code to use
> FRA_* symbols. RTA_PROTOINFO became FRA_MARK and FRA_FWMASK was
> added while RTA_MARK was added later on but serves a different purpose.
Joerg,
I went over the routing rules code. It now uses the new FRA_ definitions
and will support all attributes. You will find rtnl_rule_set_mark() and
rtnl_rule_set_mask() in the API.
I haven't tested it much though besides running nl-rule-list.
More information about the libnl
mailing list