/* (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
Person | Tokens | Prop | Commits | CommitProp |
Patrick McHardy | 81 | 84.38% | 2 | 40.00% |
Pablo Neira Ayuso | 13 | 13.54% | 1 | 20.00% |
Herbert Xu | 1 | 1.04% | 1 | 20.00% |
Jan Engelhardt | 1 | 1.04% | 1 | 20.00% |
Total | 96 | 100.00% | 5 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Patrick McHardy | 18 | 94.74% | 1 | 50.00% |
Stephen Hemminger | 1 | 5.26% | 1 | 50.00% |
Total | 19 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Patrick McHardy | 25 | 96.15% | 2 | 66.67% |
Stephen Hemminger | 1 | 3.85% | 1 | 33.33% |
Total | 26 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Patrick McHardy | 170 | 89.47% | 3 | 37.50% |
Pablo Neira Ayuso | 16 | 8.42% | 2 | 25.00% |
Stephen Hemminger | 2 | 1.05% | 1 | 12.50% |
Herbert Xu | 1 | 0.53% | 1 | 12.50% |
Jan Engelhardt | 1 | 0.53% | 1 | 12.50% |
Total | 190 | 100.00% | 8 | 100.00% |