Skip to content
Commit 1c1e761e authored by Mathieu Xhonneux's avatar Mathieu Xhonneux Committed by Daniel Borkmann
Browse files

ipv6: sr: export function lookup_nexthop



The function lookup_nexthop is essential to implement most of the seg6local
actions. As we want to provide a BPF helper allowing to apply some of these
actions on the packet being processed, the helper should be able to call
this function, hence the need to make it public.

Moreover, if one argument is incorrect or if the next hop can not be found,
an error should be returned by the BPF helper so the BPF program can adapt
its processing of the packet (return an error, properly force the drop,
...). This patch hence makes this function return dst->error to indicate a
possible error.

Signed-off-by: default avatarMathieu Xhonneux <m.xhonneux@gmail.com>
Acked-by: default avatarDavid Lebrun <dlebrun@google.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 63526e1c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment