cregit-Linux how code gets into the kernel

Release 4.11 net/netfilter/nf_nat_tftp.c

Directory: net/netfilter
/* (C) 2001-2002 Magnus Boden <mb@ozaba.mine.nu>
 *
 * 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/module.h>
#include <linux/udp.h>

#include <net/netfilter/nf_conntrack_helper.h>
#include <net/netfilter/nf_conntrack_expect.h>
#include <net/netfilter/nf_nat_helper.h>
#include <linux/netfilter/nf_conntrack_tftp.h>

MODULE_AUTHOR("Magnus Boden <mb@ozaba.mine.nu>");
MODULE_DESCRIPTION("TFTP NAT helper");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ip_nat_tftp");


static unsigned int help(struct sk_buff *skb, enum ip_conntrack_info ctinfo, struct nf_conntrack_expect *exp) { const struct nf_conn *ct = exp->master; exp->saved_proto.udp.port = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u.udp.port; exp->dir = IP_CT_DIR_REPLY; exp->expectfn = nf_nat_follow_master; if (nf_ct_expect_related(exp) != 0) { nf_ct_helper_log(skb, exp->master, "cannot add expectation"); return NF_DROP; } return NF_ACCEPT; }

Contributors

PersonTokensPropCommitsCommitProp
Patrick McHardy8184.38%240.00%
Pablo Neira Ayuso1313.54%120.00%
Herbert Xu11.04%120.00%
Jan Engelhardt11.04%120.00%
Total96100.00%5100.00%


static void __exit nf_nat_tftp_fini(void) { RCU_INIT_POINTER(nf_nat_tftp_hook, NULL); synchronize_rcu(); }

Contributors

PersonTokensPropCommitsCommitProp
Patrick McHardy1894.74%150.00%
Stephen Hemminger15.26%150.00%
Total19100.00%2100.00%


static int __init nf_nat_tftp_init(void) { BUG_ON(nf_nat_tftp_hook != NULL); RCU_INIT_POINTER(nf_nat_tftp_hook, help); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Patrick McHardy2596.15%266.67%
Stephen Hemminger13.85%133.33%
Total26100.00%3100.00%

module_init(nf_nat_tftp_init); module_exit(nf_nat_tftp_fini);

Overall Contributors

PersonTokensPropCommitsCommitProp
Patrick McHardy17089.47%337.50%
Pablo Neira Ayuso168.42%225.00%
Stephen Hemminger21.05%112.50%
Herbert Xu10.53%112.50%
Jan Engelhardt10.53%112.50%
Total190100.00%8100.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.