]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv4: ip_check_defrag should correctly check return value of skb_copy_bits
authorAlexander Drozdov <al.drozdov@gmail.com>
Tue, 17 Feb 2015 10:33:46 +0000 (13:33 +0300)
committerJiri Slaby <jslaby@suse.cz>
Thu, 12 Mar 2015 09:06:24 +0000 (10:06 +0100)
commitc0c6450b332d51df46cbe3a697991e42e7460a2e
tree5ecca18d4143986aec165aa732585cfabb486ff0
parent85320d5deb74d8cdb05082a84ef8d13812c0ea9f
ipv4: ip_check_defrag should correctly check return value of skb_copy_bits

[ Upstream commit fba04a9e0c869498889b6445fd06cbe7da9bb834 ]

skb_copy_bits() returns zero on success and negative value on error,
so it is needed to invert the condition in ip_check_defrag().

Fixes: 1bf3751ec90c ("ipv4: ip_check_defrag must not modify skb before unsharing")
Signed-off-by: Alexander Drozdov <al.drozdov@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/ipv4/ip_fragment.c