aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/input.c')
-rw-r--r--net/sctp/input.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 80564fe03024..9fb4247f9a99 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -423,6 +423,18 @@ void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc,
423 sctp_retransmit(&asoc->outqueue, t, SCTP_RTXR_PMTUD); 423 sctp_retransmit(&asoc->outqueue, t, SCTP_RTXR_PMTUD);
424} 424}
425 425
426static void sctp_icmp_redirect(struct sock *sk, struct sctp_transport *t,
427 struct sk_buff *skb)
428{
429 struct dst_entry *dst;
430
431 if (!t)
432 return;
433 dst = sctp_transport_dst_check(t);
434 if (dst && dst->ops->redirect)
435 dst->ops->redirect(dst, skb);
436}
437
426/* 438/*
427 * SCTP Implementer's Guide, 2.37 ICMP handling procedures 439 * SCTP Implementer's Guide, 2.37 ICMP handling procedures
428 * 440 *
@@ -628,6 +640,10 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info)
628 640
629 err = EHOSTUNREACH; 641 err = EHOSTUNREACH;
630 break; 642 break;
643 case ICMP_REDIRECT:
644 sctp_icmp_redirect(sk, transport, skb);
645 err = 0;
646 break;
631 default: 647 default:
632 goto out_unlock; 648 goto out_unlock;
633 } 649 }