]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/ipv6/datagram.c
leds: triggers: add invert to heartbeat
[karo-tx-linux.git] / net / ipv6 / datagram.c
index b10a88986a9896a4a33f8a4139e41d3f1013a41a..9aadd57808a515dda6edbf4b784aae2179604628 100644 (file)
@@ -199,7 +199,7 @@ ipv4_connected:
                      NULL);
 
        sk->sk_state = TCP_ESTABLISHED;
-       ip6_set_txhash(sk);
+       sk_set_txhash(sk);
 out:
        fl6_sock_release(flowlabel);
        return err;
@@ -568,8 +568,8 @@ void ip6_datagram_recv_specific_ctl(struct sock *sk, struct msghdr *msg,
        }
 
        /* HbH is allowed only once */
-       if (np->rxopt.bits.hopopts && opt->hop) {
-               u8 *ptr = nh + opt->hop;
+       if (np->rxopt.bits.hopopts && (opt->flags & IP6SKB_HOPBYHOP)) {
+               u8 *ptr = nh + sizeof(struct ipv6hdr);
                put_cmsg(msg, SOL_IPV6, IPV6_HOPOPTS, (ptr[1]+1)<<3, ptr);
        }
 
@@ -630,8 +630,8 @@ void ip6_datagram_recv_specific_ctl(struct sock *sk, struct msghdr *msg,
                int hlim = ipv6_hdr(skb)->hop_limit;
                put_cmsg(msg, SOL_IPV6, IPV6_2292HOPLIMIT, sizeof(hlim), &hlim);
        }
-       if (np->rxopt.bits.ohopopts && opt->hop) {
-               u8 *ptr = nh + opt->hop;
+       if (np->rxopt.bits.ohopopts && (opt->flags & IP6SKB_HOPBYHOP)) {
+               u8 *ptr = nh + sizeof(struct ipv6hdr);
                put_cmsg(msg, SOL_IPV6, IPV6_2292HOPOPTS, (ptr[1]+1)<<3, ptr);
        }
        if (np->rxopt.bits.odstopts && opt->dst0) {