Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote: > On Mon, Sep 12, 2016 at 09:00:25PM +0200, Florian Westphal wrote: > > Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote: > > > fib lookup ip daddr . oif > > > > > > As you are basically looking for the route based on IPv4 address and > > > the output interface, so this boils down to: > > > > > > fib lookup $expr $flags > > > > How would the kernel disentangle the register data? > > What I'm proposing is to represent this as a concatenation, since this > represents the tuple that you use to look up for route. > > > (i.e., how do i know where in the sreg e.g. the daddr is > > that i need to stuff in the flowi struct?) > > You can iterate over the concatenation compound from the > netlink_linearize path, it is just a list of expressions. Then, you > can set the NFTA_FIB_* netlink attribute using them. Ah, ok. Interesting idea, I'll give this a shot. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html