Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote> > since _OIF and _OIFNAME was restricted to prerouting, nf hookfn has NULL > > output interface, so there is nothing we could compare against. > > > > Now its available in forward too so it could be selectively relaxed for > > this, but, what is the use case? > > > > Do a RPF in forward, then we need to compare vs. incoming interface. > > This is for an esoteric scenario: Policy-based routing using input > interface as key. The fib rule for RPF does not work from prerouting > because iif cannot be inferred, there is no way to know if route in > the reverse direction exists until the route lookup for this direction > is done. Yes, that internally sets fibs iif to the oif. > > But for outgoing interface, we'd do a normal route lookup, but the stack > > already did that for us (as packet is already being forwarded). > > > > So what would be the desired outcome for a 'fib daddr . oif' check? > > Hm, this always evaluates true from forward and any later hook. > > I missing now, what is the point of . oif in general? Its for use with the 'type' output, i.e. consult fib to determine the type of the daddr (multicast, broadcast etc). I don't see an application for the fib case, with exception of the 'rpf lookup in forward' case.