diff options
author | Patrick McHardy <kaber@trash.net> | 2006-03-12 20:35:12 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-12 20:39:40 -0800 |
commit | baa829d8926f02ab04be6ec37780810d221c5b4b (patch) | |
tree | 8c2236eba68bb65aa535ab78e58777ff51de6746 /net/ipv4 | |
parent | 4a1ff6e2bde56cdf176bd54d557b2e15e819f810 (diff) | |
download | linux-baa829d8926f02ab04be6ec37780810d221c5b4b.tar.gz linux-baa829d8926f02ab04be6ec37780810d221c5b4b.tar.bz2 linux-baa829d8926f02ab04be6ec37780810d221c5b4b.zip |
[IPV4/6]: Fix UFO error propagation
When ufo_append_data fails err is uninitialized, but returned back.
Strangely gcc doesn't notice it.
Coverity #901 and #902
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_output.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 57d290d89ec2..8ee4d016740d 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -847,10 +847,11 @@ int ip_append_data(struct sock *sk, if (((length > mtu) && (sk->sk_protocol == IPPROTO_UDP)) && (rt->u.dst.dev->features & NETIF_F_UFO)) { - if(ip_ufo_append_data(sk, getfrag, from, length, hh_len, - fragheaderlen, transhdrlen, mtu, flags)) + err = ip_ufo_append_data(sk, getfrag, from, length, hh_len, + fragheaderlen, transhdrlen, mtu, + flags); + if (err) goto error; - return 0; } |