cregit-Linux how code gets into the kernel

Release 4.14 net/netfilter/nf_dup_netdev.c

Directory: net/netfilter
/*
 * Copyright (c) 2015 Pablo Neira Ayuso <pablo@netfilter.org>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 */

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/netlink.h>
#include <linux/netfilter.h>
#include <linux/netfilter/nf_tables.h>
#include <net/netfilter/nf_tables.h>
#include <net/netfilter/nf_dup_netdev.h>


static void nf_do_netdev_egress(struct sk_buff *skb, struct net_device *dev) { if (skb_mac_header_was_set(skb)) skb_push(skb, skb->mac_len); skb->dev = dev; dev_queue_xmit(skb); }

Contributors

PersonTokensPropCommitsCommitProp
Florian Westphal43100.00%1100.00%
Total43100.00%1100.00%


void nf_fwd_netdev_egress(const struct nft_pktinfo *pkt, int oif) { struct net_device *dev; dev = dev_get_by_index_rcu(nft_net(pkt), oif); if (!dev) { kfree_skb(pkt->skb); return; } nf_do_netdev_egress(pkt->skb, dev); }

Contributors

PersonTokensPropCommitsCommitProp
Florian Westphal55100.00%1100.00%
Total55100.00%1100.00%

EXPORT_SYMBOL_GPL(nf_fwd_netdev_egress);
void nf_dup_netdev_egress(const struct nft_pktinfo *pkt, int oif) { struct net_device *dev; struct sk_buff *skb; dev = dev_get_by_index_rcu(nft_net(pkt), oif); if (dev == NULL) return; skb = skb_clone(pkt->skb, GFP_ATOMIC); if (skb) nf_do_netdev_egress(skb, dev); }

Contributors

PersonTokensPropCommitsCommitProp
Pablo Neira Ayuso6498.46%266.67%
Florian Westphal11.54%133.33%
Total65100.00%3100.00%

EXPORT_SYMBOL_GPL(nf_dup_netdev_egress); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Pablo Neira Ayuso <pablo@netfilter.org>");

Overall Contributors

PersonTokensPropCommitsCommitProp
Florian Westphal10450.00%125.00%
Pablo Neira Ayuso10148.56%250.00%
Stephen Hemminger31.44%125.00%
Total208100.00%4100.00%
Directory: net/netfilter
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.