2 * Copyright (c) 2015 Pablo Neira Ayuso <pablo@netfilter.org>
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 as published by
6 * the Free Software Foundation.
9 #include <linux/kernel.h>
10 #include <linux/init.h>
11 #include <linux/module.h>
12 #include <linux/netlink.h>
13 #include <linux/netfilter.h>
14 #include <linux/netfilter/nf_tables.h>
15 #include <net/netfilter/nf_tables.h>
17 void nf_dup_netdev_egress(const struct nft_pktinfo
*pkt
, int oif
)
19 struct net_device
*dev
;
22 dev
= dev_get_by_index_rcu(pkt
->net
, oif
);
26 skb
= skb_clone(pkt
->skb
, GFP_ATOMIC
);
30 if (skb_mac_header_was_set(skb
))
31 skb_push(skb
, skb
->mac_len
);
36 EXPORT_SYMBOL_GPL(nf_dup_netdev_egress
);
38 MODULE_LICENSE("GPL");
39 MODULE_AUTHOR("Pablo Neira Ayuso <pablo@netfilter.org>");
This page took 0.031606 seconds and 5 git commands to generate.