ipvs: SCTP ports should be writable in ICMP packets
authorJulian Anastasov <ja@ssi.bg>
Tue, 18 Jun 2013 07:08:06 +0000 (10:08 +0300)
committerSimon Horman <horms@verge.net.au>
Wed, 19 Jun 2013 00:53:52 +0000 (09:53 +0900)
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>
net/netfilter/ipvs/ip_vs_core.c

index 05565d2b3a61b530acad48cfeda90b2af4b3adda..23b8eb53a5693d19e17904afa19afe15ff3ba058 100644 (file)
@@ -1442,7 +1442,8 @@ ignore_ipip:
 
        /* do the statistics and put it back */
        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);
        verdict = ip_vs_icmp_xmit(skb, cp, pp, offset, hooknum, &ciph);