[IPV6]: Fix tclass setting for raw sockets.
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Thu, 14 Sep 2006 03:01:28 +0000 (20:01 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 18 Sep 2006 06:21:07 +0000 (23:21 -0700)
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>
net/ipv6/icmp.c
net/ipv6/raw.c

index 3d6e9a3..356a8a7 100644 (file)
@@ -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;
 
index d57e61c..15b862d 100644 (file)
@@ -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;
        }