• Mathieu Xhonneux's avatar
    ipv6: sr: export function lookup_nexthop · 1c1e761e
    Mathieu Xhonneux authored
    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>
    1c1e761e
seg6_local.c 19.2 KB