Thread (67 messages) flat view 67 messages, 11 authors, 2012-08-29

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

From: Jesper Dangaard Brouer <hidden>
Date: 2012-08-28 09:03:27
Also in: lvs-devel, netfilter-devel

On Mon, 2012-08-27 at 18:20 +0300, Julian Anastasov wrote:
	Hello,

On Mon, 27 Aug 2012, Jesper Dangaard Brouer wrote:
quoted
This patch is necessary, to make IPVS work, after Patrick McHardys
IPv6 NAT defragmentation changes.

Signed-off-by: Jesper Dangaard Brouer <redacted>
---

I would appriciate, if someone (e.g. Julian) double check the tunnel mode code.
	Sure
quoted
--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) &&
I guess:
 ntohs(old_iph->payload_len) + sizeof(struct ipv6hdr)
Is the same as:
 skb->len
quoted
-	    !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?
To Julian, is the extra sizeof(struct ipv6hdr) addition to
frag_max_size, wrong? (as the mtu is already reduced)

If above statements hold, I think we can simply use
__mtu_check_toobig_v6() also for the tunnel case :-)

--Jesper
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help