aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r--net/dccp/ipv4.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 3eb76b5f221a..8f41a3190858 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -195,6 +195,14 @@ static inline void dccp_do_pmtu_discovery(struct sock *sk,
195 } /* else let the usual retransmit timer handle it */ 195 } /* else let the usual retransmit timer handle it */
196} 196}
197 197
198static void dccp_do_redirect(struct sk_buff *skb, struct sock *sk)
199{
200 struct dst_entry *dst = __sk_dst_check(sk, 0);
201
202 if (dst && dst->ops->redirect)
203 dst->ops->redirect(dst, skb);
204}
205
198/* 206/*
199 * This routine is called by the ICMP module when it gets some sort of error 207 * This routine is called by the ICMP module when it gets some sort of error
200 * condition. If err < 0 then the socket should be closed and the error 208 * condition. If err < 0 then the socket should be closed and the error
@@ -259,6 +267,9 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info)
259 } 267 }
260 268
261 switch (type) { 269 switch (type) {
270 case ICMP_REDIRECT:
271 dccp_do_redirect(skb, sk);
272 goto out;
262 case ICMP_SOURCE_QUENCH: 273 case ICMP_SOURCE_QUENCH:
263 /* Just silently ignore these. */ 274 /* Just silently ignore these. */
264 goto out; 275 goto out;