[IPV6]: Replace bogus instances of inet->recverr
While looking at this problem I noticed that IPv6 was sometimes looking at inet->recverr which is bogus. Here is a patch to correct that and use np->recverr. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
357b40a18b
Коммит
3320da8906
|
@ -1149,7 +1149,7 @@ int ip6_push_pending_frames(struct sock *sk)
|
||||||
err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dst->dev, dst_output);
|
err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dst->dev, dst_output);
|
||||||
if (err) {
|
if (err) {
|
||||||
if (err > 0)
|
if (err > 0)
|
||||||
err = inet->recverr ? net_xmit_errno(err) : 0;
|
err = np->recverr ? net_xmit_errno(err) : 0;
|
||||||
if (err)
|
if (err)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
|
@ -533,7 +533,7 @@ static int rawv6_send_hdrinc(struct sock *sk, void *from, int length,
|
||||||
struct flowi *fl, struct rt6_info *rt,
|
struct flowi *fl, struct rt6_info *rt,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
struct inet_sock *inet = inet_sk(sk);
|
struct ipv6_pinfo *np = inet6_sk(sk);
|
||||||
struct ipv6hdr *iph;
|
struct ipv6hdr *iph;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
unsigned int hh_len;
|
unsigned int hh_len;
|
||||||
|
@ -570,7 +570,7 @@ static int rawv6_send_hdrinc(struct sock *sk, void *from, int length,
|
||||||
err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, rt->u.dst.dev,
|
err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, rt->u.dst.dev,
|
||||||
dst_output);
|
dst_output);
|
||||||
if (err > 0)
|
if (err > 0)
|
||||||
err = inet->recverr ? net_xmit_errno(err) : 0;
|
err = np->recverr ? net_xmit_errno(err) : 0;
|
||||||
if (err)
|
if (err)
|
||||||
goto error;
|
goto error;
|
||||||
out:
|
out:
|
||||||
|
@ -807,8 +807,6 @@ done:
|
||||||
ip6_dst_store(sk, dst,
|
ip6_dst_store(sk, dst,
|
||||||
ipv6_addr_equal(&fl.fl6_dst, &np->daddr) ?
|
ipv6_addr_equal(&fl.fl6_dst, &np->daddr) ?
|
||||||
&np->daddr : NULL);
|
&np->daddr : NULL);
|
||||||
if (err > 0)
|
|
||||||
err = np->recverr ? net_xmit_errno(err) : 0;
|
|
||||||
|
|
||||||
release_sock(sk);
|
release_sock(sk);
|
||||||
out:
|
out:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче