linux/net/netfilter/xt_CONNSECMARK.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * This module is used to copy security markings from packets
 * to connections, and restore security markings from connections
 * back to packets.  This would normally be performed in conjunction
 * with the SECMARK target and state match.
 *
 * Based somewhat on CONNMARK:
 *   Copyright (C) 2002,2004 MARA Systems AB <https://www.marasystems.com>
 *    by Henrik Nordstrom <[email protected]>
 *
 * (C) 2006,2008 Red Hat, Inc., James Morris <[email protected]>
 */
#define pr_fmt(fmt)
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/netfilter/x_tables.h>
#include <linux/netfilter/xt_CONNSECMARK.h>
#include <net/netfilter/nf_conntrack.h>
#include <net/netfilter/nf_conntrack_ecache.h>

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_ALIAS();
MODULE_ALIAS();

/*
 * If the packet has a security mark and the connection does not, copy
 * the security mark from the packet to the connection.
 */
static void secmark_save(const struct sk_buff *skb)
{}

/*
 * If packet has no security mark, and the connection does, restore the
 * security mark from the connection to the packet.
 */
static void secmark_restore(struct sk_buff *skb)
{}

static unsigned int
connsecmark_tg(struct sk_buff *skb, const struct xt_action_param *par)
{}

static int connsecmark_tg_check(const struct xt_tgchk_param *par)
{}

static void connsecmark_tg_destroy(const struct xt_tgdtor_param *par)
{}

static struct xt_target connsecmark_tg_reg __read_mostly =;

static int __init connsecmark_tg_init(void)
{}

static void __exit connsecmark_tg_exit(void)
{}

module_init();
module_exit(connsecmark_tg_exit);