netfilter: nf_conntrack_defrag: check socket type before touching nodefrag flag
authorJiri Olsa <jolsa@redhat.com>
Tue, 21 Sep 2010 21:17:34 +0000 (21:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Sep 2010 20:13:34 +0000 (13:13 -0700)
commitcbdd769ab9de26764bde0520a91536caa1587e13
tree7a15d114613de0e8e374151628102a76562ebbbd
parentd6120b8afacec587f5feb37781bc751bc5d68a10
netfilter: nf_conntrack_defrag: check socket type before touching nodefrag flag

we need to check proper socket type within ipv4_conntrack_defrag
function before referencing the nodefrag flag.

For example the tun driver receive path produces skbs with
AF_UNSPEC socket type, and so current code is causing unwanted
fragmented packets going out.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/nf_defrag_ipv4.c