aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/nf_defrag_ipv4.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2010-06-15 01:07:31 +0000
committerDavid S. Miller <davem@davemloft.net>2010-06-23 13:16:38 -0700
commit7b2ff18ee7b0ec4bc3162f821e221781aaca48bd (patch)
treeeed7535663f6333a1dc68861d8cd7b98d8050d4d /net/ipv4/netfilter/nf_defrag_ipv4.c
parentqeth: handle missing z/VM authorization of OSX (diff)
downloadlinux-dev-7b2ff18ee7b0ec4bc3162f821e221781aaca48bd.tar.xz
linux-dev-7b2ff18ee7b0ec4bc3162f821e221781aaca48bd.zip
net - IP_NODEFRAG option for IPv4 socket
this patch is implementing IP_NODEFRAG option for IPv4 socket. The reason is, there's no other way to send out the packet with user customized header of the reassembly part. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv4/netfilter/nf_defrag_ipv4.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/nf_defrag_ipv4.c b/net/ipv4/netfilter/nf_defrag_ipv4.c
index cb763ae9ed90..eab8de32f200 100644
--- a/net/ipv4/netfilter/nf_defrag_ipv4.c
+++ b/net/ipv4/netfilter/nf_defrag_ipv4.c
@@ -66,6 +66,11 @@ static unsigned int ipv4_conntrack_defrag(unsigned int hooknum,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
+ struct inet_sock *inet = inet_sk(skb->sk);
+
+ if (inet && inet->nodefrag)
+ return NF_ACCEPT;
+
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
#if !defined(CONFIG_NF_NAT) && !defined(CONFIG_NF_NAT_MODULE)
/* Previously seen (loopback)? Ignore. Do this before