Skip to content

Commit

Permalink
[IPV6]: Fix tclass setting for raw sockets.
Browse files Browse the repository at this point in the history
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: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
yoshfuji authored and David S. Miller committed Sep 18, 2006
1 parent b552216 commit e012d51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions net/ipv6/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
if (hlimit < 0)
hlimit = ipv6_get_hoplimit(dst->dev);

tclass = np->cork.tclass;
tclass = np->tclass;
if (tclass < 0)
tclass = 0;

Expand Down Expand Up @@ -497,7 +497,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
if (hlimit < 0)
hlimit = ipv6_get_hoplimit(dst->dev);

tclass = np->cork.tclass;
tclass = np->tclass;
if (tclass < 0)
tclass = 0;

Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
}

if (tclass < 0) {
tclass = np->cork.tclass;
tclass = np->tclass;
if (tclass < 0)
tclass = 0;
}
Expand Down

0 comments on commit e012d51

Please sign in to comment.