aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2012-07-20 11:59:52 +0300
committerSimon Horman <horms@verge.net.au>2012-08-10 10:35:03 +0900
commitf2edb9f7706dcb2c0d9a362b2ba849efe3a97f5e (patch)
treea7e92aae534c38c59e3a08a8497ba80e764d436a /net/ipv6
parentipvs: fixed sparse warning (diff)
downloadlinux-dev-f2edb9f7706dcb2c0d9a362b2ba849efe3a97f5e.tar.xz
linux-dev-f2edb9f7706dcb2c0d9a362b2ba849efe3a97f5e.zip
ipvs: implement passive PMTUD for IPIP packets
IPVS is missing the logic to update PMTU in routing for its IPIP packets. We monitor the dst_mtu and can return FRAG_NEEDED messages but if the tunneled packets get ICMP error we can not rely on other traffic to save the lowest MTU. The following patch adds ICMP handling for IPIP packets in incoming direction, from some remote host to our local IP used as saddr in the outer header. By this way we can forward any related ICMP traffic if it is for IPVS TUN connection. For the special case of PMTUD we update the routing and if client requested DF we can forward the error. To properly update the routing we have to bind the cached route (dest->dst_cache) to the selected saddr because ipv4_update_pmtu uses saddr for dst lookup. Add IP_VS_RT_MODE_CONNECT flag to force such binding with second route. Update ip_vs_tunnel_xmit to provide IP_VS_RT_MODE_CONNECT and change the code to copy DF. For now we prefer not to force PMTU discovery (outer DF=1) because we don't have configuration option to enable or disable PMTUD. As we do not keep any packets to resend, we prefer not to play games with packets without DF bit because the sender is not informed when they are rejected. Also, change ops->update_pmtu to be called only for local clients because there is no point to update MTU for input routes, in our case skb->dst->dev is lo. It seems the code is copied from ipip.c where the skb dst points to tunnel device. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net/ipv6')
0 files changed, 0 insertions, 0 deletions