aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-09-24 13:00:21 -0400
committerTejun Heo <tj@kernel.org>2014-09-24 13:00:21 -0400
commitd06efebf0c37d438fcf07057be00dd40fcfce08d (patch)
tree31a0786d132aadf4cbb9725f3f444ef6e1052128 /net/ipv4
parentbb2e226b3bef596dd56be97df655d857b4603923 (diff)
parent0a30288da1aec914e158c2d7a3482a85f632750f (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block into for-3.18
This is to receive 0a30288da1ae ("blk-mq, percpu_ref: implement a kludge for SCSI blk-mq stall during probe") which implements __percpu_ref_kill_expedited() to work around SCSI blk-mq stall. The commit reverted and patches to implement proper fix will be added. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Kent Overstreet <kmo@daterainc.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ip_tunnel.c6
-rw-r--r--net/ipv4/netfilter/Kconfig102
-rw-r--r--net/ipv4/netfilter/Makefile2
-rw-r--r--net/ipv4/route.c6
4 files changed, 62 insertions, 54 deletions
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index afed1aac2638..bd41dd1948b6 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -79,10 +79,10 @@ static void __tunnel_dst_set(struct ip_tunnel_dst *idst,
79 idst->saddr = saddr; 79 idst->saddr = saddr;
80} 80}
81 81
82static void tunnel_dst_set(struct ip_tunnel *t, 82static noinline void tunnel_dst_set(struct ip_tunnel *t,
83 struct dst_entry *dst, __be32 saddr) 83 struct dst_entry *dst, __be32 saddr)
84{ 84{
85 __tunnel_dst_set(this_cpu_ptr(t->dst_cache), dst, saddr); 85 __tunnel_dst_set(raw_cpu_ptr(t->dst_cache), dst, saddr);
86} 86}
87 87
88static void tunnel_dst_reset(struct ip_tunnel *t) 88static void tunnel_dst_reset(struct ip_tunnel *t)
@@ -106,7 +106,7 @@ static struct rtable *tunnel_rtable_get(struct ip_tunnel *t,
106 struct dst_entry *dst; 106 struct dst_entry *dst;
107 107
108 rcu_read_lock(); 108 rcu_read_lock();
109 idst = this_cpu_ptr(t->dst_cache); 109 idst = raw_cpu_ptr(t->dst_cache);
110 dst = rcu_dereference(idst->dst); 110 dst = rcu_dereference(idst->dst);
111 if (dst && !atomic_inc_not_zero(&dst->__refcnt)) 111 if (dst && !atomic_inc_not_zero(&dst->__refcnt))
112 dst = NULL; 112 dst = NULL;
diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig
index fb173126f03d..7cbcaf4f0194 100644
--- a/net/ipv4/netfilter/Kconfig
+++ b/net/ipv4/netfilter/Kconfig
@@ -82,6 +82,52 @@ config NF_TABLES_ARP
82 help 82 help
83 This option enables the ARP support for nf_tables. 83 This option enables the ARP support for nf_tables.
84 84
85config NF_NAT_IPV4
86 tristate "IPv4 NAT"
87 depends on NF_CONNTRACK_IPV4
88 default m if NETFILTER_ADVANCED=n
89 select NF_NAT
90 help
91 The IPv4 NAT option allows masquerading, port forwarding and other
92 forms of full Network Address Port Translation. This can be
93 controlled by iptables or nft.
94
95if NF_NAT_IPV4
96
97config NF_NAT_SNMP_BASIC
98 tristate "Basic SNMP-ALG support"
99 depends on NF_CONNTRACK_SNMP
100 depends on NETFILTER_ADVANCED
101 default NF_NAT && NF_CONNTRACK_SNMP
102 ---help---
103
104 This module implements an Application Layer Gateway (ALG) for
105 SNMP payloads. In conjunction with NAT, it allows a network
106 management system to access multiple private networks with
107 conflicting addresses. It works by modifying IP addresses
108 inside SNMP payloads to match IP-layer NAT mapping.
109
110 This is the "basic" form of SNMP-ALG, as described in RFC 2962
111
112 To compile it as a module, choose M here. If unsure, say N.
113
114config NF_NAT_PROTO_GRE
115 tristate
116 depends on NF_CT_PROTO_GRE
117
118config NF_NAT_PPTP
119 tristate
120 depends on NF_CONNTRACK
121 default NF_CONNTRACK_PPTP
122 select NF_NAT_PROTO_GRE
123
124config NF_NAT_H323
125 tristate
126 depends on NF_CONNTRACK
127 default NF_CONNTRACK_H323
128
129endif # NF_NAT_IPV4
130
85config IP_NF_IPTABLES 131config IP_NF_IPTABLES
86 tristate "IP tables support (required for filtering/masq/NAT)" 132 tristate "IP tables support (required for filtering/masq/NAT)"
87 default m if NETFILTER_ADVANCED=n 133 default m if NETFILTER_ADVANCED=n
@@ -170,19 +216,21 @@ config IP_NF_TARGET_SYNPROXY
170 To compile it as a module, choose M here. If unsure, say N. 216 To compile it as a module, choose M here. If unsure, say N.
171 217
172# NAT + specific targets: nf_conntrack 218# NAT + specific targets: nf_conntrack
173config NF_NAT_IPV4 219config IP_NF_NAT
174 tristate "IPv4 NAT" 220 tristate "iptables NAT support"
175 depends on NF_CONNTRACK_IPV4 221 depends on NF_CONNTRACK_IPV4
176 default m if NETFILTER_ADVANCED=n 222 default m if NETFILTER_ADVANCED=n
177 select NF_NAT 223 select NF_NAT
224 select NF_NAT_IPV4
225 select NETFILTER_XT_NAT
178 help 226 help
179 The IPv4 NAT option allows masquerading, port forwarding and other 227 This enables the `nat' table in iptables. This allows masquerading,
180 forms of full Network Address Port Translation. It is controlled by 228 port forwarding and other forms of full Network Address Port
181 the `nat' table in iptables: see the man page for iptables(8). 229 Translation.
182 230
183 To compile it as a module, choose M here. If unsure, say N. 231 To compile it as a module, choose M here. If unsure, say N.
184 232
185if NF_NAT_IPV4 233if IP_NF_NAT
186 234
187config IP_NF_TARGET_MASQUERADE 235config IP_NF_TARGET_MASQUERADE
188 tristate "MASQUERADE target support" 236 tristate "MASQUERADE target support"
@@ -214,47 +262,7 @@ config IP_NF_TARGET_REDIRECT
214 (e.g. when running oldconfig). It selects 262 (e.g. when running oldconfig). It selects
215 CONFIG_NETFILTER_XT_TARGET_REDIRECT. 263 CONFIG_NETFILTER_XT_TARGET_REDIRECT.
216 264
217endif 265endif # IP_NF_NAT
218
219config NF_NAT_SNMP_BASIC
220 tristate "Basic SNMP-ALG support"
221 depends on NF_CONNTRACK_SNMP && NF_NAT_IPV4
222 depends on NETFILTER_ADVANCED
223 default NF_NAT && NF_CONNTRACK_SNMP
224 ---help---
225
226 This module implements an Application Layer Gateway (ALG) for
227 SNMP payloads. In conjunction with NAT, it allows a network
228 management system to access multiple private networks with
229 conflicting addresses. It works by modifying IP addresses
230 inside SNMP payloads to match IP-layer NAT mapping.
231
232 This is the "basic" form of SNMP-ALG, as described in RFC 2962
233
234 To compile it as a module, choose M here. If unsure, say N.
235
236# If they want FTP, set to $CONFIG_IP_NF_NAT (m or y),
237# or $CONFIG_IP_NF_FTP (m or y), whichever is weaker.
238# From kconfig-language.txt:
239#
240# <expr> '&&' <expr> (6)
241#
242# (6) Returns the result of min(/expr/, /expr/).
243
244config NF_NAT_PROTO_GRE
245 tristate
246 depends on NF_NAT_IPV4 && NF_CT_PROTO_GRE
247
248config NF_NAT_PPTP
249 tristate
250 depends on NF_CONNTRACK && NF_NAT_IPV4
251 default NF_NAT_IPV4 && NF_CONNTRACK_PPTP
252 select NF_NAT_PROTO_GRE
253
254config NF_NAT_H323
255 tristate
256 depends on NF_CONNTRACK && NF_NAT_IPV4
257 default NF_NAT_IPV4 && NF_CONNTRACK_H323
258 266
259# mangle + specific targets 267# mangle + specific targets
260config IP_NF_MANGLE 268config IP_NF_MANGLE
diff --git a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile
index 33001621465b..edf4af32e9f2 100644
--- a/net/ipv4/netfilter/Makefile
+++ b/net/ipv4/netfilter/Makefile
@@ -43,7 +43,7 @@ obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o
43# the three instances of ip_tables 43# the three instances of ip_tables
44obj-$(CONFIG_IP_NF_FILTER) += iptable_filter.o 44obj-$(CONFIG_IP_NF_FILTER) += iptable_filter.o
45obj-$(CONFIG_IP_NF_MANGLE) += iptable_mangle.o 45obj-$(CONFIG_IP_NF_MANGLE) += iptable_mangle.o
46obj-$(CONFIG_NF_NAT_IPV4) += iptable_nat.o 46obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o
47obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o 47obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o
48obj-$(CONFIG_IP_NF_SECURITY) += iptable_security.o 48obj-$(CONFIG_IP_NF_SECURITY) += iptable_security.o
49 49
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index eaa4b000c7b4..173e7ea54c70 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2265,9 +2265,9 @@ struct rtable *ip_route_output_flow(struct net *net, struct flowi4 *flp4,
2265 return rt; 2265 return rt;
2266 2266
2267 if (flp4->flowi4_proto) 2267 if (flp4->flowi4_proto)
2268 rt = (struct rtable *) xfrm_lookup(net, &rt->dst, 2268 rt = (struct rtable *)xfrm_lookup_route(net, &rt->dst,
2269 flowi4_to_flowi(flp4), 2269 flowi4_to_flowi(flp4),
2270 sk, 0); 2270 sk, 0);
2271 2271
2272 return rt; 2272 return rt;
2273} 2273}