From patchwork Wed Jun 24 13:22:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julius Volz X-Patchwork-Id: 29126 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 5FD97B708F for ; Wed, 24 Jun 2009 23:23:00 +1000 (EST) Received: by ozlabs.org (Postfix) id 4FF68DDD0B; Wed, 24 Jun 2009 23:23:00 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id B365DDDD01 for ; Wed, 24 Jun 2009 23:22:59 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753358AbZFXNWg (ORCPT ); Wed, 24 Jun 2009 09:22:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753319AbZFXNWf (ORCPT ); Wed, 24 Jun 2009 09:22:35 -0400 Received: from mail-ew0-f210.google.com ([209.85.219.210]:48858 "EHLO mail-ew0-f210.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752795AbZFXNWe (ORCPT ); Wed, 24 Jun 2009 09:22:34 -0400 Received: by ewy6 with SMTP id 6so1162013ewy.37 for ; Wed, 24 Jun 2009 06:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=Mc6oaprkQb4u2nVh4/GxCtUMDDhgpGqZj1WpGm+Fors=; b=fMOZddJJhvK64M4WY7wE8E8hh4p1du8IfhirGbRn4DoGagYTOnmZkIC3fP/kNLYh41 /zMRiZlug/si4KQ8xhgaRHECM9lnyQXz8I77AWYqMjD609nJFv22YnvB/hMdJITk702L YT20+81x0yN3JjFBHZ0I9gO9PZvnlMA6FaoQc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=RgTC47OIeeiYGx+rKL1oOJJHA9cKilr0o5t7UfGcSRtcp/iV0bkuYwP9/5J3FWkNxO NUUKguwFZbemNFTgDm637lugxmcELMp1prA13nXwvp3Fefn4ybPMotomK2aYvXKbkSAJ MIkjPhtwU4NELyVLX5D5K1sbqDAe7Z4JZcuIE= Received: by 10.210.54.15 with SMTP id c15mr759526eba.78.1245849755915; Wed, 24 Jun 2009 06:22:35 -0700 (PDT) Received: from egardia (i59F7603C.versanet.de [89.247.96.60]) by mx.google.com with ESMTPS id 28sm2265916eyg.24.2009.06.24.06.22.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 24 Jun 2009 06:22:35 -0700 (PDT) Date: Wed, 24 Jun 2009 15:22:32 +0200 From: Julius Volz To: lvs-devel@vger.kernel.org, netdev@vger.kernel.org Cc: robert.gallagher@heanet.ie, horms@verge.net.au Subject: [PATCH] IPVS: Add handling of incoming ICMPV6_PKT_TOOBIG messages Message-ID: <20090624132232.GA9633@egardia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add handling of incoming ICMPv6 Packet Too Big messages. This message is received when a realserver sends a packet >PMTU to the client. The hop on this path with insufficient MTU will generate an ICMPv6 Packet Too Big message back to the VIP. The LVS server receives this message, but the call to the function handling this has been missing. Thus, IPVS fails to forward the message to the real server, which then does not adjust the path MTU. This patch adds the missing call to ip_vs_in_icmp_v6() in ip_vs_in() to handle this situation. Thanks to Rob Gallagher from HEAnet for reporting this issue and for testing this patch in production (with direct routing mode). Signed-off-by: Julius Volz Tested-by: Rob Gallagher Acked-by: Simon Horman --- 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 8dddb17..5750800 100644 --- a/net/netfilter/ipvs/ip_vs_core.c +++ b/net/netfilter/ipvs/ip_vs_core.c @@ -1274,13 +1274,24 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, return NF_ACCEPT; } - if (unlikely(iph.protocol == IPPROTO_ICMP)) { - int related, verdict = ip_vs_in_icmp(skb, &related, hooknum); +#ifdef CONFIG_IP_VS_IPV6 + if (af == AF_INET6) { + if (unlikely(iph.protocol == IPPROTO_ICMPV6)) { + int related, verdict = ip_vs_in_icmp_v6(skb, &related, hooknum); - if (related) - return verdict; - ip_vs_fill_iphdr(af, skb_network_header(skb), &iph); - } + if (related) + return verdict; + ip_vs_fill_iphdr(af, skb_network_header(skb), &iph); + } + } else +#endif + if (unlikely(iph.protocol == IPPROTO_ICMP)) { + int related, verdict = ip_vs_in_icmp(skb, &related, hooknum); + + if (related) + return verdict; + ip_vs_fill_iphdr(af, skb_network_header(skb), &iph); + } /* Protocol supported? */ pp = ip_vs_proto_get(iph.protocol);