[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1346165359.3571.9.camel@edumazet-glaptop>
Date: Tue, 28 Aug 2012 07:49:19 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>
Cc: netdev@...r.kernel.org, Patrick McHardy <kaber@...sh.net>,
lvs-devel@...r.kernel.org, Julian Anastasov <ja@....bg>,
Simon Horman <horms@...ge.net.au>,
Pablo Neira Ayuso <pablo@...filter.org>,
Hans Schillstrom <hans@...illstrom.com>,
Wensong Zhang <wensong@...ux-vs.org>,
netfilter-devel@...r.kernel.org
Subject: Re: [PATCH V2 2/2] ipvs: Extend MTU check to account for IPv6 NAT
defrag changes
On Tue, 2012-08-28 at 16:23 +0200, 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@...hat.com>
> ---
> In V2: the tunnel mode is no longer a special case.
>
> net/netfilter/ipvs/ip_vs_xmit.c | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
> index 67a3978..56f6d5d 100644
> --- a/net/netfilter/ipvs/ip_vs_xmit.c
> +++ b/net/netfilter/ipvs/ip_vs_xmit.c
> @@ -88,7 +88,14 @@ __ip_vs_dst_check(struct ip_vs_dest *dest, u32 rtos)
> static inline bool
> __mtu_check_toobig_v6(const struct sk_buff *skb, u32 mtu)
> {
> - if (skb->len > mtu && !skb_is_gso(skb)) {
> + if (IP6CB(skb)->frag_max_size) {
> + /* frag_max_size tell us that, this packet have been
> + * defragmented by netfilter IPv6 conntrack module.
> + */
> + if (IP6CB(skb)->frag_max_size > mtu)
> + return true; /* largest fragment violate MTU */
> + }
> + else if (skb->len > mtu && !skb_is_gso(skb)) {
> return true; /* Packet size violate MTU size */
> }
Couldnt you use a single test ?
if (IP6CB(skb)->frag_max_size > mtu)
return true;
if (skb->len > mtu && !skb_is_gso(skb))
return true;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists