LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH 2/2] ipvs: Extend MTU check to account for IPv6 NAT defrag ch

To: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>
Subject: Re: [PATCH 2/2] ipvs: Extend MTU check to account for IPv6 NAT defrag changes
Cc: netdev@xxxxxxxxxxxxxxx, Patrick McHardy <kaber@xxxxxxxxx>, lvs-devel@xxxxxxxxxxxxxxx, Simon Horman <horms@xxxxxxxxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Hans Schillstrom <hans@xxxxxxxxxxxxxxx>, Wensong Zhang <wensong@xxxxxxxxxxxx>, netfilter-devel@xxxxxxxxxxxxxxx
From: Julian Anastasov <ja@xxxxxx>
Date: Mon, 27 Aug 2012 18:20:32 +0300 (EEST)
        Hello,

On Mon, 27 Aug 2012, Jesper Dangaard Brouer wrote:

> This patch is necessary, to make IPVS work, after Patrick McHardys
> IPv6 NAT defragmentation changes.
> 
> Signed-off-by: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>
> ---
> 
> I would appriciate, if someone (e.g. Julian) double check the tunnel mode 
> code.

        Sure

> --Jesper
> 
>  net/netfilter/ipvs/ip_vs_xmit.c |   16 +++++++++++++---
>  1 files changed, 13 insertions(+), 3 deletions(-)
> 
> @@ -956,8 +963,11 @@ ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct 
> ip_vs_conn *cp,
>               skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu);
>  
>       /* MTU checking: Special for tunnel mode */
> -     if (mtu < ntohs(old_iph->payload_len) + sizeof(struct ipv6hdr) &&
> -         !skb_is_gso(skb)) {
> +     if ((!IP6CB(skb)->frag_max_size &&
> +          (mtu < ntohs(old_iph->payload_len) + sizeof(struct ipv6hdr) &&
> +           !skb_is_gso(skb)))
> +         || IP6CB(skb)->frag_max_size + sizeof(struct ipv6hdr) > mtu) {
> +

        mtu is already reduced with the new outer header size,
may be we can just call __mtu_check_toobig_v6 with mtu?

>               if (!skb->dev) {
>                       struct net *net = dev_net(skb_dst(skb)->dev);

        All other changes in patch 1 and 2 look ok and
I'll ack them next time.

Regards

--
Julian Anastasov <ja@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>