Thread (6 messages) 6 messages, 3 authors, 2015-05-31

Re: [PATCH net-next] bpf: allow BPF programs access skb->skb_iif and skb->dev->ifindex fields

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2015-05-28 19:22:43

On 05/28/2015 12:30 AM, Alexei Starovoitov wrote:
classic BPF already exposes skb->dev->ifindex via SKF_AD_IFINDEX extension.
Allow eBPF program to access it as well. Note that classic aborts execution
of the program if 'skb->dev == NULL' (which is inconvenient for program
writers), whereas eBPF returns zero in such case.
That's better, yep.
Also expose the 'skb_iif' field, since programs triggered by redirected
packet need to known the original interface index.
Summary:
__skb->ifindex         -> skb->dev->ifindex
__skb->ingress_ifindex -> skb->skb_iif

Signed-off-by: Alexei Starovoitov <redacted>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help