ipvs: SCTP ports should be writable in ICMP packets

Make sure that SCTP ports are writable when embedded in ICMP
from client, so that ip_vs_nat_icmp can translate them safely.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
Julian Anastasov 2013-06-18 10:08:06 +03:00 committed by Simon Horman
parent b396966c46
commit 06f3d7f973
1 changed files with 2 additions and 1 deletions

View File

@ -1442,7 +1442,8 @@ ignore_ipip:
/* do the statistics and put it back */ /* do the statistics and put it back */
ip_vs_in_stats(cp, skb); ip_vs_in_stats(cp, skb);
if (IPPROTO_TCP == cih->protocol || IPPROTO_UDP == cih->protocol) if (IPPROTO_TCP == cih->protocol || IPPROTO_UDP == cih->protocol ||
IPPROTO_SCTP == cih->protocol)
offset += 2 * sizeof(__u16); offset += 2 * sizeof(__u16);
verdict = ip_vs_icmp_xmit(skb, cp, pp, offset, hooknum, &ciph); verdict = ip_vs_icmp_xmit(skb, cp, pp, offset, hooknum, &ciph);