aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-08-14 01:41:02 -0400
committerTejun Heo <tj@kernel.org>2009-08-14 01:45:31 -0400
commit384be2b18a5f9475eab9ca2bdfa95cc1a04ef59c (patch)
tree04c93f391a1b65c8bf8d7ba8643c07d26c26590a /net/ipv6
parenta76761b621bcd8336065c4fe3a74f046858bc34c (diff)
parent142d44b0dd6741a64a7bdbe029110e7c1dcf1d23 (diff)
Merge branch 'percpu-for-linus' into percpu-for-next
Conflicts: arch/sparc/kernel/smp_64.c arch/x86/kernel/cpu/perf_counter.c arch/x86/kernel/setup_percpu.c drivers/cpufreq/cpufreq_ondemand.c mm/percpu.c Conflicts in core and arch percpu codes are mostly from commit ed78e1e078dd44249f88b1dd8c76dafb39567161 which substituted many num_possible_cpus() with nr_cpu_ids. As for-next branch has moved all the first chunk allocators into mm/percpu.c, the changes are moved from arch code to mm/percpu.c. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/addrconf.c30
-rw-r--r--net/ipv6/ip6_output.c1
-rw-r--r--net/ipv6/sit.c1
-rw-r--r--net/ipv6/tcp_ipv6.c3
-rw-r--r--net/ipv6/xfrm6_policy.c6
5 files changed, 34 insertions, 7 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 3883b4036a74..43b3c9f89c12 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1916,8 +1916,32 @@ ok:
1916 update_lft = 1; 1916 update_lft = 1;
1917 else if (stored_lft <= MIN_VALID_LIFETIME) { 1917 else if (stored_lft <= MIN_VALID_LIFETIME) {
1918 /* valid_lft <= stored_lft is always true */ 1918 /* valid_lft <= stored_lft is always true */
1919 /* XXX: IPsec */ 1919 /*
1920 update_lft = 0; 1920 * RFC 4862 Section 5.5.3e:
1921 * "Note that the preferred lifetime of
1922 * the corresponding address is always
1923 * reset to the Preferred Lifetime in
1924 * the received Prefix Information
1925 * option, regardless of whether the
1926 * valid lifetime is also reset or
1927 * ignored."
1928 *
1929 * So if the preferred lifetime in
1930 * this advertisement is different
1931 * than what we have stored, but the
1932 * valid lifetime is invalid, just
1933 * reset prefered_lft.
1934 *
1935 * We must set the valid lifetime
1936 * to the stored lifetime since we'll
1937 * be updating the timestamp below,
1938 * else we'll set it back to the
1939 * minumum.
1940 */
1941 if (prefered_lft != ifp->prefered_lft) {
1942 valid_lft = stored_lft;
1943 update_lft = 1;
1944 }
1921 } else { 1945 } else {
1922 valid_lft = MIN_VALID_LIFETIME; 1946 valid_lft = MIN_VALID_LIFETIME;
1923 if (valid_lft < prefered_lft) 1947 if (valid_lft < prefered_lft)
@@ -3085,7 +3109,7 @@ restart:
3085 spin_unlock(&ifp->lock); 3109 spin_unlock(&ifp->lock);
3086 continue; 3110 continue;
3087 } else if (age >= ifp->prefered_lft) { 3111 } else if (age >= ifp->prefered_lft) {
3088 /* jiffies - ifp->tsamp > age >= ifp->prefered_lft */ 3112 /* jiffies - ifp->tstamp > age >= ifp->prefered_lft */
3089 int deprecate = 0; 3113 int deprecate = 0;
3090 3114
3091 if (!(ifp->flags&IFA_F_DEPRECATED)) { 3115 if (!(ifp->flags&IFA_F_DEPRECATED)) {
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 7c76e3d18215..87f8419a68fd 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1484,7 +1484,6 @@ int ip6_push_pending_frames(struct sock *sk)
1484 skb->len += tmp_skb->len; 1484 skb->len += tmp_skb->len;
1485 skb->data_len += tmp_skb->len; 1485 skb->data_len += tmp_skb->len;
1486 skb->truesize += tmp_skb->truesize; 1486 skb->truesize += tmp_skb->truesize;
1487 __sock_put(tmp_skb->sk);
1488 tmp_skb->destructor = NULL; 1487 tmp_skb->destructor = NULL;
1489 tmp_skb->sk = NULL; 1488 tmp_skb->sk = NULL;
1490 } 1489 }
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 68e52308e552..98b7327d0949 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1018,6 +1018,7 @@ static void ipip6_tunnel_setup(struct net_device *dev)
1018 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); 1018 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr);
1019 dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr); 1019 dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr);
1020 dev->flags = IFF_NOARP; 1020 dev->flags = IFF_NOARP;
1021 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
1021 dev->iflink = 0; 1022 dev->iflink = 0;
1022 dev->addr_len = 4; 1023 dev->addr_len = 4;
1023 dev->features |= NETIF_F_NETNS_LOCAL; 1024 dev->features |= NETIF_F_NETNS_LOCAL;
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 58810c65b635..d849dd53b788 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -896,6 +896,7 @@ struct request_sock_ops tcp6_request_sock_ops __read_mostly = {
896#ifdef CONFIG_TCP_MD5SIG 896#ifdef CONFIG_TCP_MD5SIG
897static struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { 897static struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = {
898 .md5_lookup = tcp_v6_reqsk_md5_lookup, 898 .md5_lookup = tcp_v6_reqsk_md5_lookup,
899 .calc_md5_hash = tcp_v6_md5_hash_skb,
899}; 900};
900#endif 901#endif
901 902
@@ -1441,7 +1442,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
1441 */ 1442 */
1442 char *newkey = kmemdup(key->key, key->keylen, GFP_ATOMIC); 1443 char *newkey = kmemdup(key->key, key->keylen, GFP_ATOMIC);
1443 if (newkey != NULL) 1444 if (newkey != NULL)
1444 tcp_v6_md5_do_add(newsk, &inet6_sk(sk)->daddr, 1445 tcp_v6_md5_do_add(newsk, &newnp->daddr,
1445 newkey, key->keylen); 1446 newkey, key->keylen);
1446 } 1447 }
1447#endif 1448#endif
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index b4b16a43f277..3a3c677bc0f2 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -157,7 +157,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
157 ipv6_addr_copy(&fl->fl6_dst, reverse ? &hdr->saddr : &hdr->daddr); 157 ipv6_addr_copy(&fl->fl6_dst, reverse ? &hdr->saddr : &hdr->daddr);
158 ipv6_addr_copy(&fl->fl6_src, reverse ? &hdr->daddr : &hdr->saddr); 158 ipv6_addr_copy(&fl->fl6_src, reverse ? &hdr->daddr : &hdr->saddr);
159 159
160 while (pskb_may_pull(skb, nh + offset + 1 - skb->data)) { 160 while (nh + offset + 1 < skb->data ||
161 pskb_may_pull(skb, nh + offset + 1 - skb->data)) {
161 nh = skb_network_header(skb); 162 nh = skb_network_header(skb);
162 exthdr = (struct ipv6_opt_hdr *)(nh + offset); 163 exthdr = (struct ipv6_opt_hdr *)(nh + offset);
163 164
@@ -177,7 +178,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
177 case IPPROTO_TCP: 178 case IPPROTO_TCP:
178 case IPPROTO_SCTP: 179 case IPPROTO_SCTP:
179 case IPPROTO_DCCP: 180 case IPPROTO_DCCP:
180 if (!onlyproto && pskb_may_pull(skb, nh + offset + 4 - skb->data)) { 181 if (!onlyproto && (nh + offset + 4 < skb->data ||
182 pskb_may_pull(skb, nh + offset + 4 - skb->data))) {
181 __be16 *ports = (__be16 *)exthdr; 183 __be16 *ports = (__be16 *)exthdr;
182 184
183 fl->fl_ip_sport = ports[!!reverse]; 185 fl->fl_ip_sport = ports[!!reverse];