aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_policy.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-11-14 00:35:32 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:53:40 -0500
commit45ff5a3f9a3d0b1b4f063b5285ab39b7fac59471 (patch)
tree4b7ed3d419b20e935f356f2020bd485e6f1e6ab5 /net/ipv4/xfrm4_policy.c
parent8ce68ceb55fb62d2c8e9a3e94c4ef6ff3e3064ce (diff)
[IPSEC]: Set dst->input to dst_discard
The input function should never be invoked on IPsec dst objects. This is because we don't apply IPsec on input until after we've made the routing decision. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/xfrm4_policy.c')
-rw-r--r--net/ipv4/xfrm4_policy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 7d250a1bd2cf..c40a71b74dba 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -10,6 +10,7 @@
10 10
11#include <linux/compiler.h> 11#include <linux/compiler.h>
12#include <linux/inetdevice.h> 12#include <linux/inetdevice.h>
13#include <net/dst.h>
13#include <net/xfrm.h> 14#include <net/xfrm.h>
14#include <net/ip.h> 15#include <net/ip.h>
15 16
@@ -167,7 +168,7 @@ __xfrm4_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
167 dst_prev->trailer_len = trailer_len; 168 dst_prev->trailer_len = trailer_len;
168 memcpy(&dst_prev->metrics, &x->route->metrics, sizeof(dst_prev->metrics)); 169 memcpy(&dst_prev->metrics, &x->route->metrics, sizeof(dst_prev->metrics));
169 170
170 dst_prev->input = rt->u.dst.input; 171 dst_prev->input = dst_discard;
171 dst_prev->output = dst_prev->xfrm->outer_mode->afinfo->output; 172 dst_prev->output = dst_prev->xfrm->outer_mode->afinfo->output;
172 if (rt0->peer) 173 if (rt0->peer)
173 atomic_inc(&rt0->peer->refcnt); 174 atomic_inc(&rt0->peer->refcnt);