Commit e012d51c authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller

[IPV6]: Fix tclass setting for raw sockets.

np->cork.tclass is used only in cork'ed context.
Otherwise, np->tclass should be used.

Bug#7096 reported by Remi Denis-Courmont <rdenis@simphalempin.com>.
Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b552216f
...@@ -401,7 +401,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, ...@@ -401,7 +401,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
if (hlimit < 0) if (hlimit < 0)
hlimit = ipv6_get_hoplimit(dst->dev); hlimit = ipv6_get_hoplimit(dst->dev);
tclass = np->cork.tclass; tclass = np->tclass;
if (tclass < 0) if (tclass < 0)
tclass = 0; tclass = 0;
...@@ -497,7 +497,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb) ...@@ -497,7 +497,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
if (hlimit < 0) if (hlimit < 0)
hlimit = ipv6_get_hoplimit(dst->dev); hlimit = ipv6_get_hoplimit(dst->dev);
tclass = np->cork.tclass; tclass = np->tclass;
if (tclass < 0) if (tclass < 0)
tclass = 0; tclass = 0;
......
...@@ -781,7 +781,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, ...@@ -781,7 +781,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
} }
if (tclass < 0) { if (tclass < 0) {
tclass = np->cork.tclass; tclass = np->tclass;
if (tclass < 0) if (tclass < 0)
tclass = 0; tclass = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment