ipv6: sr: add helper functions for seg6local
authorDavid Lebrun <david.lebrun@uclouvain.be>
Fri, 25 Aug 2017 07:56:47 +0000 (09:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Aug 2017 00:10:24 +0000 (17:10 -0700)
commitd7a669dd2f8ba07a17423f4ad586dfc0379882f7
tree8843f8eebddf23afdbc45c8847a886a9ff0c81a4
parent6285217f0c29e68b744533a9ddf50e110d36d65e
ipv6: sr: add helper functions for seg6local

This patch adds three helper functions to be used with the seg6local packet
processing actions.

The decap_and_validate() function will be used by the End.D* actions, that
decapsulate an SR-enabled packet.

The advance_nextseg() function applies the fundamental operations to update
an SRH for the next segment.

The lookup_nexthop() function helps select the next-hop for the processed
SR packets. It supports an optional next-hop address to route the packet
specifically through it, and an optional routing table to use.

Signed-off-by: David Lebrun <david.lebrun@uclouvain.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/Kconfig
net/ipv6/seg6_local.c