UPSTREAM: xfrm: fix XFRMA_OUTPUT_MARK policy entry
authorMichal Kubecek <mkubecek@suse.cz>
Wed, 29 Nov 2017 17:23:56 +0000 (18:23 +0100)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:32:13 +0000 (17:32 +0800)
This seems to be an obvious typo, NLA_U32 is type of the attribute, not its
(minimal) length.

Fixes: 077fbac405bf ("net: xfrm: support setting an output mark.")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit e719135881f00c01ca400abb8a5dadaf297a24f9)
Signed-off-by: Benedict Wong <benedictwong@google.com>
Bug: 113046120
Change-Id: I4c1a8de03febfa246b99c7eb67d77f74a1e3ba93

net/xfrm/xfrm_user.c

index e989b2bbbd6720a039d04ec5da5ce7904bddf7e8..824f3a9fe5b7041207d8969d28d9eee0cf775e25 100644 (file)
@@ -2563,6 +2563,7 @@ static const struct nla_policy xfrma_policy[XFRMA_MAX+1] = {
        [XFRMA_PROTO]           = { .type = NLA_U8 },
        [XFRMA_ADDRESS_FILTER]  = { .len = sizeof(struct xfrm_address_filter) },
        [XFRMA_OFFLOAD_DEV]     = { .len = sizeof(struct xfrm_user_offload) },
+        [XFRMA_OUTPUT_MARK]     = { .type = NLA_U32 },
        [XFRMA_SET_MARK]        = { .type = NLA_U32 },
        [XFRMA_SET_MARK_MASK]   = { .type = NLA_U32 },
        [XFRMA_IF_ID]           = { .type = NLA_U32 },