[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>
This commit is contained in:
parent
4a1ff6e2bd
commit
baa829d892
2 changed files with 8 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -944,10 +944,11 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
|
|||
if (((length > mtu) && (sk->sk_protocol == IPPROTO_UDP)) &&
|
||||
(rt->u.dst.dev->features & NETIF_F_UFO)) {
|
||||
|
||||
if(ip6_ufo_append_data(sk, getfrag, from, length, hh_len,
|
||||
fragheaderlen, transhdrlen, mtu, flags))
|
||||
err = ip6_ufo_append_data(sk, getfrag, from, length, hh_len,
|
||||
fragheaderlen, transhdrlen, mtu,
|
||||
flags);
|
||||
if (err)
|
||||
goto error;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue