From: YOSHIFUJI Hideaki Date: Thu, 14 Sep 2006 03:01:28 +0000 (-0700) Subject: [IPV6]: Fix tclass setting for raw sockets. X-Git-Tag: v2.6.18~11^2~11 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e012d51cbc41c5e603d7850c82acb0dad9e450dd;p=linux-2.6-omap-h63xx.git [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 . Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller --- diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 3d6e9a35115..356a8a7ef22 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -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; @@ -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; diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index d57e61ce4a7..15b862d8aca 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -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; }