aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_policy.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-12 00:27:49 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-12 00:27:49 -0400
commit55be7a9c6074f749d617a7fc1914c9a23505438c (patch)
tree507268878abc1c5f5476823264b6f9f8acefa205 /net/ipv4/xfrm4_policy.c
parentb42597e2f36e2043756aa7462faddf630962f061 (diff)
ipv4: Add redirect support to all protocol icmp error handlers.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/xfrm4_policy.c')
-rw-r--r--net/ipv4/xfrm4_policy.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 87d3fcc302d4..258ebd7b268b 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -202,6 +202,15 @@ static void xfrm4_update_pmtu(struct dst_entry *dst, u32 mtu)
202 path->ops->update_pmtu(path, mtu); 202 path->ops->update_pmtu(path, mtu);
203} 203}
204 204
205static void xfrm4_redirect(struct dst_entry *dst, struct sk_buff *skb)
206{
207 struct xfrm_dst *xdst = (struct xfrm_dst *)dst;
208 struct dst_entry *path = xdst->route;
209
210 if (path->ops->redirect)
211 path->ops->redirect(path, skb);
212}
213
205static void xfrm4_dst_destroy(struct dst_entry *dst) 214static void xfrm4_dst_destroy(struct dst_entry *dst)
206{ 215{
207 struct xfrm_dst *xdst = (struct xfrm_dst *)dst; 216 struct xfrm_dst *xdst = (struct xfrm_dst *)dst;
@@ -225,6 +234,7 @@ static struct dst_ops xfrm4_dst_ops = {
225 .protocol = cpu_to_be16(ETH_P_IP), 234 .protocol = cpu_to_be16(ETH_P_IP),
226 .gc = xfrm4_garbage_collect, 235 .gc = xfrm4_garbage_collect,
227 .update_pmtu = xfrm4_update_pmtu, 236 .update_pmtu = xfrm4_update_pmtu,
237 .redirect = xfrm4_redirect,
228 .cow_metrics = dst_cow_metrics_generic, 238 .cow_metrics = dst_cow_metrics_generic,
229 .destroy = xfrm4_dst_destroy, 239 .destroy = xfrm4_dst_destroy,
230 .ifdown = xfrm4_dst_ifdown, 240 .ifdown = xfrm4_dst_ifdown,