15 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
16 #include <linux/module.h>
19 #include <linux/netfilter/x_tables.h>
28 #define PFX "SECMARK: "
42 secmark = info->
secid;
48 skb->secmark = secmark;
68 pr_info(
"unable to map security context \'%s\'\n", info->
secctx);
72 err = security_secmark_relabel_packet(info->
secid);
74 pr_info(
"unable to obtain relabeling permission\n");
78 security_secmark_refcount_inc();
89 pr_info(
"target only valid in the \'mangle\' "
90 "or \'security\' tables, not \'%s\'.\n", par->
table);
95 pr_info(
"mode already set to %hu cannot mix with "
96 "rules for mode %hu\n",
mode, info->
mode);
100 switch (info->
mode) {
108 err = checkentry_lsm(info);
121 security_secmark_refcount_dec();
129 .checkentry = secmark_tg_check,
130 .destroy = secmark_tg_destroy,
131 .target = secmark_tg,
136 static int __init secmark_tg_init(
void)
141 static void __exit secmark_tg_exit(
void)