diff options
-rw-r--r-- | net/netfilter/ipvs/ip_vs_core.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c index a986ee20e128..b95699f00545 100644 --- a/net/netfilter/ipvs/ip_vs_core.c +++ b/net/netfilter/ipvs/ip_vs_core.c | |||
@@ -1277,13 +1277,24 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, | |||
1277 | return NF_ACCEPT; | 1277 | return NF_ACCEPT; |
1278 | } | 1278 | } |
1279 | 1279 | ||
1280 | if (unlikely(iph.protocol == IPPROTO_ICMP)) { | 1280 | #ifdef CONFIG_IP_VS_IPV6 |
1281 | int related, verdict = ip_vs_in_icmp(skb, &related, hooknum); | 1281 | if (af == AF_INET6) { |
1282 | if (unlikely(iph.protocol == IPPROTO_ICMPV6)) { | ||
1283 | int related, verdict = ip_vs_in_icmp_v6(skb, &related, hooknum); | ||
1282 | 1284 | ||
1283 | if (related) | 1285 | if (related) |
1284 | return verdict; | 1286 | return verdict; |
1285 | ip_vs_fill_iphdr(af, skb_network_header(skb), &iph); | 1287 | ip_vs_fill_iphdr(af, skb_network_header(skb), &iph); |
1286 | } | 1288 | } |
1289 | } else | ||
1290 | #endif | ||
1291 | if (unlikely(iph.protocol == IPPROTO_ICMP)) { | ||
1292 | int related, verdict = ip_vs_in_icmp(skb, &related, hooknum); | ||
1293 | |||
1294 | if (related) | ||
1295 | return verdict; | ||
1296 | ip_vs_fill_iphdr(af, skb_network_header(skb), &iph); | ||
1297 | } | ||
1287 | 1298 | ||
1288 | /* Protocol supported? */ | 1299 | /* Protocol supported? */ |
1289 | pp = ip_vs_proto_get(iph.protocol); | 1300 | pp = ip_vs_proto_get(iph.protocol); |