Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2014-04-07 13:35:32 +0200
committerJiri Kosina <jkosina@suse.cz>2014-04-07 14:32:42 +0200
commit172cdff8d6a4f5d488dc82dff867e68ef50201cc (patch)
tree134eec678464ccb8895c0849c6d032747ccf10ff
parent6e73c0ee0534f31ab0977c9de732f5fcfc8db11c (diff)
- Update
patches.fixes/inet-Pass-inetpeer-root-into-inet_getpeer-interfaces.patch (bnc#864833 bnc#870801). - Refresh patches.fixes/inet-Hide-route-peer-accesses-behind-helpers.patch.
-rw-r--r--patches.fixes/inet-Hide-route-peer-accesses-behind-helpers.patch8
-rw-r--r--patches.fixes/inet-Pass-inetpeer-root-into-inet_getpeer-interfaces.patch50
2 files changed, 52 insertions, 6 deletions
diff --git a/patches.fixes/inet-Hide-route-peer-accesses-behind-helpers.patch b/patches.fixes/inet-Hide-route-peer-accesses-behind-helpers.patch
index bf1ae18181..8862372514 100644
--- a/patches.fixes/inet-Hide-route-peer-accesses-behind-helpers.patch
+++ b/patches.fixes/inet-Hide-route-peer-accesses-behind-helpers.patch
@@ -515,11 +515,11 @@ index 600f786..c64b9e8 100644
if (peer->tcp_ts_stamp) {
ts = peer->tcp_ts;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
-index f909dc0..370178b 100644
+index e1de604..3e7c43e 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1796,9 +1796,9 @@ struct inet_peer *tcp_v4_get_peer(struct sock *sk, bool *release_it)
- peer = inet_getpeer_v4(net, inet->inet_daddr, 1);
+ peer = inet_getpeer_v4(net->ipv4.peers, inet->inet_daddr, 1);
*release_it = true;
} else {
- if (!rt->peer)
@@ -745,11 +745,11 @@ index 6945da7..6de25cd 100644
if (rt == NULL) {
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
-index 39874e8..547f4a8 100644
+index 5515fe1..f0d762d 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1874,9 +1874,9 @@ static struct inet_peer *tcp_v6_get_peer(struct sock *sk, bool *release_it)
- peer = inet_getpeer_v6(net, &np->daddr, 1);
+ peer = inet_getpeer_v6(net->ipv6.peers, &np->daddr, 1);
*release_it = true;
} else {
- if (!rt->rt6i_peer)
diff --git a/patches.fixes/inet-Pass-inetpeer-root-into-inet_getpeer-interfaces.patch b/patches.fixes/inet-Pass-inetpeer-root-into-inet_getpeer-interfaces.patch
index 73db3d5fd4..605a83eb50 100644
--- a/patches.fixes/inet-Pass-inetpeer-root-into-inet_getpeer-interfaces.patch
+++ b/patches.fixes/inet-Pass-inetpeer-root-into-inet_getpeer-interfaces.patch
@@ -3,7 +3,7 @@ Date: Sat, 9 Jun 2012 19:12:36 -0700
Subject: inet: Pass inetpeer root into inet_getpeer*() interfaces.
Patch-mainline: v3.6-rc1
Git-commit: c0efc887dcadbdbfe171f028acfab9c7c00e9dde
-References: bnc#864833
+References: bnc#864833 bnc#870801
Otherwise we reference potentially non-existing members when
ipv6 is disabled.
@@ -18,8 +18,10 @@ Conflicts:
net/ipv4/inetpeer.c | 9 +--------
net/ipv4/ip_fragment.c | 2 +-
net/ipv4/route.c | 6 +++---
+ net/ipv4/tcp_ipv4.c | 4 ++--
net/ipv6/route.c | 2 +-
- 5 files changed, 11 insertions(+), 18 deletions(-)
+ net/ipv6/tcp_ipv6.c | 4 ++--
+ 7 files changed, 15 insertions(+), 22 deletions(-)
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index 83cf2b0..e103c8b 100644
@@ -136,6 +138,28 @@ index 722b367..600f786 100644
if (peer) {
rt->rt_peer_genid = rt_peer_genid();
if (inet_metrics_new(peer))
+diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
+index f909dc0..e1de604 100644
+--- a/net/ipv4/tcp_ipv4.c
++++ b/net/ipv4/tcp_ipv4.c
+@@ -1793,7 +1793,7 @@ struct inet_peer *tcp_v4_get_peer(struct sock *sk, bool *release_it)
+
+ if (!rt ||
+ inet->cork.fl.u.ip4.daddr != inet->inet_daddr) {
+- peer = inet_getpeer_v4(net, inet->inet_daddr, 1);
++ peer = inet_getpeer_v4(net->ipv4.peers, inet->inet_daddr, 1);
+ *release_it = true;
+ } else {
+ if (!rt->peer)
+@@ -1811,7 +1811,7 @@ void *tcp_v4_tw_get_peer(struct sock *sk)
+ struct inet_timewait_sock *tw = inet_twsk(sk);
+ struct net *net = sock_net(sk);
+
+- return inet_getpeer_v4(net, tw->tw_daddr, 1);
++ return inet_getpeer_v4(net->ipv4.peers, tw->tw_daddr, 1);
+ }
+ EXPORT_SYMBOL(tcp_v4_tw_get_peer);
+
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index c704c5f..6945da7 100644
--- a/net/ipv6/route.c
@@ -149,6 +173,28 @@ index c704c5f..6945da7 100644
if (peer && cmpxchg(&rt->rt6i_peer, NULL, peer) != NULL)
inet_putpeer(peer);
else
+diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
+index 39874e8..5515fe1 100644
+--- a/net/ipv6/tcp_ipv6.c
++++ b/net/ipv6/tcp_ipv6.c
+@@ -1871,7 +1871,7 @@ static struct inet_peer *tcp_v6_get_peer(struct sock *sk, bool *release_it)
+
+ if (!rt ||
+ !ipv6_addr_equal(&np->daddr, &rt->rt6i_dst.addr)) {
+- peer = inet_getpeer_v6(net, &np->daddr, 1);
++ peer = inet_getpeer_v6(net->ipv6.peers, &np->daddr, 1);
+ *release_it = true;
+ } else {
+ if (!rt->rt6i_peer)
+@@ -1892,7 +1892,7 @@ static void *tcp_v6_tw_get_peer(struct sock *sk)
+ if (tw->tw_family == AF_INET)
+ return tcp_v4_tw_get_peer(sk);
+
+- return inet_getpeer_v6(net, &tw6->tw_v6_daddr, 1);
++ return inet_getpeer_v6(net->ipv6.peers, &tw6->tw_v6_daddr, 1);
+ }
+
+ static struct timewait_sock_ops tcp6_timewait_sock_ops = {
--
1.8.1.4