1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2008-2009 Patrick McHardy <kaber@trash.net>
4 * Copyright (c) 2014 Intel Corporation
5 * Author: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
7 * Development of this code funded by Astaro AG (http://www.astaro.com/)
10 #include <linux/kernel.h>
11 #include <linux/netlink.h>
12 #include <linux/netfilter.h>
13 #include <linux/netfilter/nf_tables.h>
16 #include <linux/ipv6.h>
17 #include <linux/smp.h>
18 #include <linux/static_key.h>
22 #include <net/tcp_states.h> /* for TCP_TIME_WAIT */
23 #include <net/netfilter/nf_tables.h>
24 #include <net/netfilter/nf_tables_core.h>
25 #include <net/netfilter/nft_meta.h>
26 #include <net/netfilter/nf_tables_offload.h>
28 #include <uapi/linux/netfilter_bridge.h> /* NF_BR_PRE_ROUTING */
30 #define NFT_META_SECS_PER_MINUTE 60
31 #define NFT_META_SECS_PER_HOUR 3600
32 #define NFT_META_SECS_PER_DAY 86400
33 #define NFT_META_DAYS_PER_WEEK 7
35 static DEFINE_PER_CPU(struct rnd_state
, nft_prandom_state
);
37 static u8
nft_meta_weekday(void)
39 time64_t secs
= ktime_get_real_seconds();
43 secs
-= NFT_META_SECS_PER_MINUTE
* sys_tz
.tz_minuteswest
;
44 dse
= div_u64(secs
, NFT_META_SECS_PER_DAY
);
45 wday
= (4 + dse
) % NFT_META_DAYS_PER_WEEK
;
50 static u32
nft_meta_hour(time64_t secs
)
54 time64_to_tm(secs
, 0, &tm
);
56 return tm
.tm_hour
* NFT_META_SECS_PER_HOUR
57 + tm
.tm_min
* NFT_META_SECS_PER_MINUTE
61 static noinline_for_stack
void
62 nft_meta_get_eval_time(enum nft_meta_keys key
,
66 case NFT_META_TIME_NS
:
67 nft_reg_store64(dest
, ktime_get_real_ns());
69 case NFT_META_TIME_DAY
:
70 nft_reg_store8(dest
, nft_meta_weekday());
72 case NFT_META_TIME_HOUR
:
73 *dest
= nft_meta_hour(ktime_get_real_seconds());
81 nft_meta_get_eval_pkttype_lo(const struct nft_pktinfo
*pkt
,
84 const struct sk_buff
*skb
= pkt
->skb
;
86 switch (nft_pf(pkt
)) {
88 if (ipv4_is_multicast(ip_hdr(skb
)->daddr
))
89 nft_reg_store8(dest
, PACKET_MULTICAST
);
91 nft_reg_store8(dest
, PACKET_BROADCAST
);
94 nft_reg_store8(dest
, PACKET_MULTICAST
);
97 switch (skb
->protocol
) {
98 case htons(ETH_P_IP
): {
99 int noff
= skb_network_offset(skb
);
100 struct iphdr
*iph
, _iph
;
102 iph
= skb_header_pointer(skb
, noff
,
103 sizeof(_iph
), &_iph
);
107 if (ipv4_is_multicast(iph
->daddr
))
108 nft_reg_store8(dest
, PACKET_MULTICAST
);
110 nft_reg_store8(dest
, PACKET_BROADCAST
);
114 case htons(ETH_P_IPV6
):
115 nft_reg_store8(dest
, PACKET_MULTICAST
);
131 nft_meta_get_eval_skugid(enum nft_meta_keys key
,
133 const struct nft_pktinfo
*pkt
)
135 struct sock
*sk
= skb_to_full_sk(pkt
->skb
);
138 if (!sk
|| !sk_fullsock(sk
) || !net_eq(nft_net(pkt
), sock_net(sk
)))
141 read_lock_bh(&sk
->sk_callback_lock
);
142 sock
= sk
->sk_socket
;
143 if (!sock
|| !sock
->file
) {
144 read_unlock_bh(&sk
->sk_callback_lock
);
150 *dest
= from_kuid_munged(sock_net(sk
)->user_ns
,
151 sock
->file
->f_cred
->fsuid
);
154 *dest
= from_kgid_munged(sock_net(sk
)->user_ns
,
155 sock
->file
->f_cred
->fsgid
);
161 read_unlock_bh(&sk
->sk_callback_lock
);
165 #ifdef CONFIG_CGROUP_NET_CLASSID
167 nft_meta_get_eval_cgroup(u32
*dest
, const struct nft_pktinfo
*pkt
)
169 struct sock
*sk
= skb_to_full_sk(pkt
->skb
);
171 if (!sk
|| !sk_fullsock(sk
) || !net_eq(nft_net(pkt
), sock_net(sk
)))
174 *dest
= sock_cgroup_classid(&sk
->sk_cgrp_data
);
179 static noinline
bool nft_meta_get_eval_kind(enum nft_meta_keys key
,
181 const struct nft_pktinfo
*pkt
)
183 const struct net_device
*in
= nft_in(pkt
), *out
= nft_out(pkt
);
186 case NFT_META_IIFKIND
:
187 if (!in
|| !in
->rtnl_link_ops
)
189 strncpy((char *)dest
, in
->rtnl_link_ops
->kind
, IFNAMSIZ
);
191 case NFT_META_OIFKIND
:
192 if (!out
|| !out
->rtnl_link_ops
)
194 strncpy((char *)dest
, out
->rtnl_link_ops
->kind
, IFNAMSIZ
);
203 static void nft_meta_store_ifindex(u32
*dest
, const struct net_device
*dev
)
205 *dest
= dev
? dev
->ifindex
: 0;
208 static void nft_meta_store_ifname(u32
*dest
, const struct net_device
*dev
)
210 strncpy((char *)dest
, dev
? dev
->name
: "", IFNAMSIZ
);
213 static bool nft_meta_store_iftype(u32
*dest
, const struct net_device
*dev
)
218 nft_reg_store16(dest
, dev
->type
);
222 static bool nft_meta_store_ifgroup(u32
*dest
, const struct net_device
*dev
)
231 static bool nft_meta_get_eval_ifname(enum nft_meta_keys key
, u32
*dest
,
232 const struct nft_pktinfo
*pkt
)
235 case NFT_META_IIFNAME
:
236 nft_meta_store_ifname(dest
, nft_in(pkt
));
238 case NFT_META_OIFNAME
:
239 nft_meta_store_ifname(dest
, nft_out(pkt
));
242 nft_meta_store_ifindex(dest
, nft_in(pkt
));
245 nft_meta_store_ifindex(dest
, nft_out(pkt
));
247 case NFT_META_IIFTYPE
:
248 if (!nft_meta_store_iftype(dest
, nft_in(pkt
)))
251 case NFT_META_OIFTYPE
:
252 if (!nft_meta_store_iftype(dest
, nft_out(pkt
)))
255 case NFT_META_IIFGROUP
:
256 if (!nft_meta_store_ifgroup(dest
, nft_in(pkt
)))
259 case NFT_META_OIFGROUP
:
260 if (!nft_meta_store_ifgroup(dest
, nft_out(pkt
)))
270 static noinline u32
nft_prandom_u32(void)
272 struct rnd_state
*state
= this_cpu_ptr(&nft_prandom_state
);
274 return prandom_u32_state(state
);
277 #ifdef CONFIG_IP_ROUTE_CLASSID
279 nft_meta_get_eval_rtclassid(const struct sk_buff
*skb
, u32
*dest
)
281 const struct dst_entry
*dst
= skb_dst(skb
);
286 *dest
= dst
->tclassid
;
291 static noinline u32
nft_meta_get_eval_sdif(const struct nft_pktinfo
*pkt
)
293 switch (nft_pf(pkt
)) {
295 return inet_sdif(pkt
->skb
);
297 return inet6_sdif(pkt
->skb
);
304 nft_meta_get_eval_sdifname(u32
*dest
, const struct nft_pktinfo
*pkt
)
306 u32 sdif
= nft_meta_get_eval_sdif(pkt
);
307 const struct net_device
*dev
;
309 dev
= sdif
? dev_get_by_index_rcu(nft_net(pkt
), sdif
) : NULL
;
310 nft_meta_store_ifname(dest
, dev
);
313 void nft_meta_get_eval(const struct nft_expr
*expr
,
314 struct nft_regs
*regs
,
315 const struct nft_pktinfo
*pkt
)
317 const struct nft_meta
*priv
= nft_expr_priv(expr
);
318 const struct sk_buff
*skb
= pkt
->skb
;
319 u32
*dest
= ®s
->data
[priv
->dreg
];
325 case NFT_META_PROTOCOL
:
326 nft_reg_store16(dest
, (__force u16
)skb
->protocol
);
328 case NFT_META_NFPROTO
:
329 nft_reg_store8(dest
, nft_pf(pkt
));
331 case NFT_META_L4PROTO
:
334 nft_reg_store8(dest
, pkt
->tprot
);
336 case NFT_META_PRIORITY
:
337 *dest
= skb
->priority
;
344 case NFT_META_IIFNAME
:
345 case NFT_META_OIFNAME
:
346 case NFT_META_IIFTYPE
:
347 case NFT_META_OIFTYPE
:
348 case NFT_META_IIFGROUP
:
349 case NFT_META_OIFGROUP
:
350 if (!nft_meta_get_eval_ifname(priv
->key
, dest
, pkt
))
355 if (!nft_meta_get_eval_skugid(priv
->key
, dest
, pkt
))
358 #ifdef CONFIG_IP_ROUTE_CLASSID
359 case NFT_META_RTCLASSID
:
360 if (!nft_meta_get_eval_rtclassid(skb
, dest
))
364 #ifdef CONFIG_NETWORK_SECMARK
365 case NFT_META_SECMARK
:
366 *dest
= skb
->secmark
;
369 case NFT_META_PKTTYPE
:
370 if (skb
->pkt_type
!= PACKET_LOOPBACK
) {
371 nft_reg_store8(dest
, skb
->pkt_type
);
375 if (!nft_meta_get_eval_pkttype_lo(pkt
, dest
))
379 *dest
= raw_smp_processor_id();
381 #ifdef CONFIG_CGROUP_NET_CLASSID
382 case NFT_META_CGROUP
:
383 if (!nft_meta_get_eval_cgroup(dest
, pkt
))
387 case NFT_META_PRANDOM
:
388 *dest
= nft_prandom_u32();
391 case NFT_META_SECPATH
:
392 nft_reg_store8(dest
, secpath_exists(skb
));
395 case NFT_META_IIFKIND
:
396 case NFT_META_OIFKIND
:
397 if (!nft_meta_get_eval_kind(priv
->key
, dest
, pkt
))
400 case NFT_META_TIME_NS
:
401 case NFT_META_TIME_DAY
:
402 case NFT_META_TIME_HOUR
:
403 nft_meta_get_eval_time(priv
->key
, dest
);
406 *dest
= nft_meta_get_eval_sdif(pkt
);
408 case NFT_META_SDIFNAME
:
409 nft_meta_get_eval_sdifname(dest
, pkt
);
418 regs
->verdict
.code
= NFT_BREAK
;
420 EXPORT_SYMBOL_GPL(nft_meta_get_eval
);
422 void nft_meta_set_eval(const struct nft_expr
*expr
,
423 struct nft_regs
*regs
,
424 const struct nft_pktinfo
*pkt
)
426 const struct nft_meta
*meta
= nft_expr_priv(expr
);
427 struct sk_buff
*skb
= pkt
->skb
;
428 u32
*sreg
= ®s
->data
[meta
->sreg
];
436 case NFT_META_PRIORITY
:
437 skb
->priority
= value
;
439 case NFT_META_PKTTYPE
:
440 value8
= nft_reg_load8(sreg
);
442 if (skb
->pkt_type
!= value8
&&
443 skb_pkt_type_ok(value8
) &&
444 skb_pkt_type_ok(skb
->pkt_type
))
445 skb
->pkt_type
= value8
;
447 case NFT_META_NFTRACE
:
448 value8
= nft_reg_load8(sreg
);
450 skb
->nf_trace
= !!value8
;
452 #ifdef CONFIG_NETWORK_SECMARK
453 case NFT_META_SECMARK
:
454 skb
->secmark
= value
;
461 EXPORT_SYMBOL_GPL(nft_meta_set_eval
);
463 const struct nla_policy nft_meta_policy
[NFTA_META_MAX
+ 1] = {
464 [NFTA_META_DREG
] = { .type
= NLA_U32
},
465 [NFTA_META_KEY
] = { .type
= NLA_U32
},
466 [NFTA_META_SREG
] = { .type
= NLA_U32
},
468 EXPORT_SYMBOL_GPL(nft_meta_policy
);
470 int nft_meta_get_init(const struct nft_ctx
*ctx
,
471 const struct nft_expr
*expr
,
472 const struct nlattr
* const tb
[])
474 struct nft_meta
*priv
= nft_expr_priv(expr
);
477 priv
->key
= ntohl(nla_get_be32(tb
[NFTA_META_KEY
]));
479 case NFT_META_PROTOCOL
:
480 case NFT_META_IIFTYPE
:
481 case NFT_META_OIFTYPE
:
484 case NFT_META_NFPROTO
:
485 case NFT_META_L4PROTO
:
487 case NFT_META_PRIORITY
:
494 #ifdef CONFIG_IP_ROUTE_CLASSID
495 case NFT_META_RTCLASSID
:
497 #ifdef CONFIG_NETWORK_SECMARK
498 case NFT_META_SECMARK
:
500 case NFT_META_PKTTYPE
:
502 case NFT_META_IIFGROUP
:
503 case NFT_META_OIFGROUP
:
504 #ifdef CONFIG_CGROUP_NET_CLASSID
505 case NFT_META_CGROUP
:
509 case NFT_META_IIFNAME
:
510 case NFT_META_OIFNAME
:
511 case NFT_META_IIFKIND
:
512 case NFT_META_OIFKIND
:
513 case NFT_META_SDIFNAME
:
516 case NFT_META_PRANDOM
:
517 prandom_init_once(&nft_prandom_state
);
521 case NFT_META_SECPATH
:
525 case NFT_META_TIME_NS
:
528 case NFT_META_TIME_DAY
:
531 case NFT_META_TIME_HOUR
:
538 priv
->dreg
= nft_parse_register(tb
[NFTA_META_DREG
]);
539 return nft_validate_register_store(ctx
, priv
->dreg
, NULL
,
540 NFT_DATA_VALUE
, len
);
542 EXPORT_SYMBOL_GPL(nft_meta_get_init
);
544 static int nft_meta_get_validate_sdif(const struct nft_ctx
*ctx
)
548 switch (ctx
->family
) {
552 hooks
= (1 << NF_INET_LOCAL_IN
) |
553 (1 << NF_INET_FORWARD
);
559 return nft_chain_validate_hooks(ctx
->chain
, hooks
);
562 static int nft_meta_get_validate_xfrm(const struct nft_ctx
*ctx
)
567 switch (ctx
->family
) {
569 hooks
= 1 << NF_NETDEV_INGRESS
;
574 hooks
= (1 << NF_INET_PRE_ROUTING
) |
575 (1 << NF_INET_LOCAL_IN
) |
576 (1 << NF_INET_FORWARD
);
582 return nft_chain_validate_hooks(ctx
->chain
, hooks
);
588 static int nft_meta_get_validate(const struct nft_ctx
*ctx
,
589 const struct nft_expr
*expr
,
590 const struct nft_data
**data
)
592 const struct nft_meta
*priv
= nft_expr_priv(expr
);
595 case NFT_META_SECPATH
:
596 return nft_meta_get_validate_xfrm(ctx
);
598 case NFT_META_SDIFNAME
:
599 return nft_meta_get_validate_sdif(ctx
);
607 int nft_meta_set_validate(const struct nft_ctx
*ctx
,
608 const struct nft_expr
*expr
,
609 const struct nft_data
**data
)
611 struct nft_meta
*priv
= nft_expr_priv(expr
);
614 if (priv
->key
!= NFT_META_PKTTYPE
)
617 switch (ctx
->family
) {
619 hooks
= 1 << NF_BR_PRE_ROUTING
;
622 hooks
= 1 << NF_NETDEV_INGRESS
;
627 hooks
= 1 << NF_INET_PRE_ROUTING
;
633 return nft_chain_validate_hooks(ctx
->chain
, hooks
);
635 EXPORT_SYMBOL_GPL(nft_meta_set_validate
);
637 int nft_meta_set_init(const struct nft_ctx
*ctx
,
638 const struct nft_expr
*expr
,
639 const struct nlattr
* const tb
[])
641 struct nft_meta
*priv
= nft_expr_priv(expr
);
645 priv
->key
= ntohl(nla_get_be32(tb
[NFTA_META_KEY
]));
648 case NFT_META_PRIORITY
:
649 #ifdef CONFIG_NETWORK_SECMARK
650 case NFT_META_SECMARK
:
654 case NFT_META_NFTRACE
:
657 case NFT_META_PKTTYPE
:
664 priv
->sreg
= nft_parse_register(tb
[NFTA_META_SREG
]);
665 err
= nft_validate_register_load(priv
->sreg
, len
);
669 if (priv
->key
== NFT_META_NFTRACE
)
670 static_branch_inc(&nft_trace_enabled
);
674 EXPORT_SYMBOL_GPL(nft_meta_set_init
);
676 int nft_meta_get_dump(struct sk_buff
*skb
,
677 const struct nft_expr
*expr
)
679 const struct nft_meta
*priv
= nft_expr_priv(expr
);
681 if (nla_put_be32(skb
, NFTA_META_KEY
, htonl(priv
->key
)))
682 goto nla_put_failure
;
683 if (nft_dump_register(skb
, NFTA_META_DREG
, priv
->dreg
))
684 goto nla_put_failure
;
690 EXPORT_SYMBOL_GPL(nft_meta_get_dump
);
692 int nft_meta_set_dump(struct sk_buff
*skb
, const struct nft_expr
*expr
)
694 const struct nft_meta
*priv
= nft_expr_priv(expr
);
696 if (nla_put_be32(skb
, NFTA_META_KEY
, htonl(priv
->key
)))
697 goto nla_put_failure
;
698 if (nft_dump_register(skb
, NFTA_META_SREG
, priv
->sreg
))
699 goto nla_put_failure
;
706 EXPORT_SYMBOL_GPL(nft_meta_set_dump
);
708 void nft_meta_set_destroy(const struct nft_ctx
*ctx
,
709 const struct nft_expr
*expr
)
711 const struct nft_meta
*priv
= nft_expr_priv(expr
);
713 if (priv
->key
== NFT_META_NFTRACE
)
714 static_branch_dec(&nft_trace_enabled
);
716 EXPORT_SYMBOL_GPL(nft_meta_set_destroy
);
718 static int nft_meta_get_offload(struct nft_offload_ctx
*ctx
,
719 struct nft_flow_rule
*flow
,
720 const struct nft_expr
*expr
)
722 const struct nft_meta
*priv
= nft_expr_priv(expr
);
723 struct nft_offload_reg
*reg
= &ctx
->regs
[priv
->dreg
];
726 case NFT_META_PROTOCOL
:
727 NFT_OFFLOAD_MATCH_EXACT(FLOW_DISSECTOR_KEY_BASIC
, basic
, n_proto
,
729 nft_offload_set_dependency(ctx
, NFT_OFFLOAD_DEP_NETWORK
);
731 case NFT_META_L4PROTO
:
732 NFT_OFFLOAD_MATCH_EXACT(FLOW_DISSECTOR_KEY_BASIC
, basic
, ip_proto
,
734 nft_offload_set_dependency(ctx
, NFT_OFFLOAD_DEP_TRANSPORT
);
737 NFT_OFFLOAD_MATCH_EXACT(FLOW_DISSECTOR_KEY_META
, meta
,
738 ingress_ifindex
, sizeof(__u32
), reg
);
740 case NFT_META_IIFTYPE
:
741 NFT_OFFLOAD_MATCH_EXACT(FLOW_DISSECTOR_KEY_META
, meta
,
742 ingress_iftype
, sizeof(__u16
), reg
);
751 static const struct nft_expr_ops nft_meta_get_ops
= {
752 .type
= &nft_meta_type
,
753 .size
= NFT_EXPR_SIZE(sizeof(struct nft_meta
)),
754 .eval
= nft_meta_get_eval
,
755 .init
= nft_meta_get_init
,
756 .dump
= nft_meta_get_dump
,
757 .validate
= nft_meta_get_validate
,
758 .offload
= nft_meta_get_offload
,
761 static const struct nft_expr_ops nft_meta_set_ops
= {
762 .type
= &nft_meta_type
,
763 .size
= NFT_EXPR_SIZE(sizeof(struct nft_meta
)),
764 .eval
= nft_meta_set_eval
,
765 .init
= nft_meta_set_init
,
766 .destroy
= nft_meta_set_destroy
,
767 .dump
= nft_meta_set_dump
,
768 .validate
= nft_meta_set_validate
,
771 static const struct nft_expr_ops
*
772 nft_meta_select_ops(const struct nft_ctx
*ctx
,
773 const struct nlattr
* const tb
[])
775 if (tb
[NFTA_META_KEY
] == NULL
)
776 return ERR_PTR(-EINVAL
);
778 if (tb
[NFTA_META_DREG
] && tb
[NFTA_META_SREG
])
779 return ERR_PTR(-EINVAL
);
781 #if IS_ENABLED(CONFIG_NF_TABLES_BRIDGE) && IS_MODULE(CONFIG_NFT_BRIDGE_META)
782 if (ctx
->family
== NFPROTO_BRIDGE
)
783 return ERR_PTR(-EAGAIN
);
785 if (tb
[NFTA_META_DREG
])
786 return &nft_meta_get_ops
;
788 if (tb
[NFTA_META_SREG
])
789 return &nft_meta_set_ops
;
791 return ERR_PTR(-EINVAL
);
794 struct nft_expr_type nft_meta_type __read_mostly
= {
796 .select_ops
= nft_meta_select_ops
,
797 .policy
= nft_meta_policy
,
798 .maxattr
= NFTA_META_MAX
,
799 .owner
= THIS_MODULE
,
802 #ifdef CONFIG_NETWORK_SECMARK
808 static const struct nla_policy nft_secmark_policy
[NFTA_SECMARK_MAX
+ 1] = {
809 [NFTA_SECMARK_CTX
] = { .type
= NLA_STRING
, .len
= NFT_SECMARK_CTX_MAXLEN
},
812 static int nft_secmark_compute_secid(struct nft_secmark
*priv
)
817 err
= security_secctx_to_secid(priv
->ctx
, strlen(priv
->ctx
), &tmp_secid
);
824 err
= security_secmark_relabel_packet(tmp_secid
);
828 priv
->secid
= tmp_secid
;
832 static void nft_secmark_obj_eval(struct nft_object
*obj
, struct nft_regs
*regs
,
833 const struct nft_pktinfo
*pkt
)
835 const struct nft_secmark
*priv
= nft_obj_data(obj
);
836 struct sk_buff
*skb
= pkt
->skb
;
838 skb
->secmark
= priv
->secid
;
841 static int nft_secmark_obj_init(const struct nft_ctx
*ctx
,
842 const struct nlattr
* const tb
[],
843 struct nft_object
*obj
)
845 struct nft_secmark
*priv
= nft_obj_data(obj
);
848 if (tb
[NFTA_SECMARK_CTX
] == NULL
)
851 priv
->ctx
= nla_strdup(tb
[NFTA_SECMARK_CTX
], GFP_KERNEL
);
855 err
= nft_secmark_compute_secid(priv
);
861 security_secmark_refcount_inc();
866 static int nft_secmark_obj_dump(struct sk_buff
*skb
, struct nft_object
*obj
,
869 struct nft_secmark
*priv
= nft_obj_data(obj
);
872 if (nla_put_string(skb
, NFTA_SECMARK_CTX
, priv
->ctx
))
876 err
= nft_secmark_compute_secid(priv
);
884 static void nft_secmark_obj_destroy(const struct nft_ctx
*ctx
, struct nft_object
*obj
)
886 struct nft_secmark
*priv
= nft_obj_data(obj
);
888 security_secmark_refcount_dec();
893 static const struct nft_object_ops nft_secmark_obj_ops
= {
894 .type
= &nft_secmark_obj_type
,
895 .size
= sizeof(struct nft_secmark
),
896 .init
= nft_secmark_obj_init
,
897 .eval
= nft_secmark_obj_eval
,
898 .dump
= nft_secmark_obj_dump
,
899 .destroy
= nft_secmark_obj_destroy
,
901 struct nft_object_type nft_secmark_obj_type __read_mostly
= {
902 .type
= NFT_OBJECT_SECMARK
,
903 .ops
= &nft_secmark_obj_ops
,
904 .maxattr
= NFTA_SECMARK_MAX
,
905 .policy
= nft_secmark_policy
,
906 .owner
= THIS_MODULE
,
908 #endif /* CONFIG_NETWORK_SECMARK */