mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
ipv4: Add redirect support to all protocol icmp error handlers.
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b42597e2f3
commit
55be7a9c60
12 changed files with 110 additions and 16 deletions
|
@ -423,6 +423,18 @@ void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc,
|
|||
sctp_retransmit(&asoc->outqueue, t, SCTP_RTXR_PMTUD);
|
||||
}
|
||||
|
||||
static void sctp_icmp_redirect(struct sock *sk, struct sctp_transport *t,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
struct dst_entry *dst;
|
||||
|
||||
if (!t)
|
||||
return;
|
||||
dst = sctp_transport_dst_check(t);
|
||||
if (dst && dst->ops->redirect)
|
||||
dst->ops->redirect(dst, skb);
|
||||
}
|
||||
|
||||
/*
|
||||
* SCTP Implementer's Guide, 2.37 ICMP handling procedures
|
||||
*
|
||||
|
@ -628,6 +640,10 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info)
|
|||
|
||||
err = EHOSTUNREACH;
|
||||
break;
|
||||
case ICMP_REDIRECT:
|
||||
sctp_icmp_redirect(sk, transport, skb);
|
||||
err = 0;
|
||||
break;
|
||||
default:
|
||||
goto out_unlock;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue