aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2011-06-29 23:19:32 +0000
committerStefan Bader <stefan.bader@canonical.com>2015-05-29 11:54:16 +0200
commitb5d2cef6e2de3ab14dbcae30e5768678ab86e616 (patch)
treec916573cf14778397ade4f3059a09b6bc6f0914f
parentfcda7e34df402d013774a4c6c064b5ec44e3a81b (diff)
downloadlinux-2.6.32.y-drm33.z-b5d2cef6e2de3ab14dbcae30e5768678ab86e616.tar.gz
ipv4: Don't use ufo handling on later transformed packets
We might call ip_ufo_append_data() for packets that will be IPsec transformed later. This function should be used just for real udp packets. So we check for rt->dst.header_len which is only nonzero on IPsec handling and call ip_ufo_append_data() just if rt->dst.header_len is zero. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit c146066ab80267c3305de5dda6a4083f06df9265) Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
-rw-r--r--net/ipv4/ip_output.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index faa662396bc8c1..bd5c4b388129bd 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -878,6 +878,7 @@ int ip_append_data(struct sock *sk,
if (((length > mtu) || (skb && skb_has_frags(skb))) &&
(sk->sk_protocol == IPPROTO_UDP) &&
(rt->u.dst.dev->features & NETIF_F_UFO)) {
+ (rt->u.dst.dev->features & NETIF_F_UFO) && !rt->u.dst.header_len) {
err = ip_ufo_append_data(sk, getfrag, from, length, hh_len,
fragheaderlen, transhdrlen, mtu,
flags);