]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ip: xfrm: support adding xfrm metadata as lwtunnel info in routes
authorEyal Birger <eyal.birger@gmail.com>
Mon, 3 Oct 2022 09:12:12 +0000 (12:12 +0300)
committerDavid Ahern <dsahern@kernel.org>
Mon, 3 Oct 2022 14:49:04 +0000 (08:49 -0600)
commit75776cf2472d14f89eabe51b9253f5ecfb84f462
tree2cb9a54c9fc590110e152e29f3d7dfe92b588292
parent51a63279f0027dd8e9edbb54a75ade88395c6b1d
ip: xfrm: support adding xfrm metadata as lwtunnel info in routes

Support for xfrm metadata as lwtunnel metadata was added in kernel commit
2c2493b9da91 ("xfrm: lwtunnel: add lwtunnel support for xfrm interfaces in collect_md mode")

This commit adds the respective support in lwt routes.

Example use (consider ipsec1 as an xfrm interface in "external" mode):

ip route add 10.1.0.0/24 dev ipsec1 encap xfrm if_id 1

Or in the context of vrf, one can also specify the "link" property:

ip route add 10.1.0.0/24 dev ipsec1 encap xfrm if_id 1 link_dev eth15

Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
ip/iproute.c
ip/iproute_lwtunnel.c
man/man8/ip-route.8.in