]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ip xfrm: support setting XFRMA_SET_MARK_MASK attribute in states
authorAntony Antony <antony@phenome.org>
Fri, 2 Oct 2020 13:22:38 +0000 (15:22 +0200)
committerDavid Ahern <dsahern@gmail.com>
Wed, 7 Oct 2020 06:10:47 +0000 (00:10 -0600)
commit4322b13c8d87bdbe7cd6854c254da30e7f68b449
tree050eca31c40e7722826236c6b2c47ab8306164f2
parent8dc1db80e41f8c32f68cc6f3440920ed3e373631
ip xfrm: support setting XFRMA_SET_MARK_MASK attribute in states

The XFRMA_SET_MARK_MASK attribute can be set in states (4.19+)
It is optional and the kernel default is 0xffffffff
It is the mask of XFRMA_SET_MARK(a.k.a. XFRMA_OUTPUT_MARK in 4.18)

e.g.
./ip/ip xfrm state add output-mark 0x6 mask 0xab proto esp \
 auth digest_null 0 enc cipher_null ''
ip xfrm state
src 0.0.0.0 dst 0.0.0.0
proto esp spi 0x00000000 reqid 0 mode transport
replay-window 0
output-mark 0x6/0xab
auth-trunc digest_null 0x30 0
enc ecb(cipher_null)
anti-replay context: seq 0x0, oseq 0x0, bitmap 0x00000000
sel src 0.0.0.0/0 dst 0.0.0.0/0

Signed-off-by: Antony Antony <antony@phenome.org>
Signed-off-by: David Ahern <dsahern@gmail.com>
ip/xfrm_state.c
man/man8/ip-xfrm.8