]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ipv4: Don't use ufo handling on later transformed packets
authorSteffen Klassert <steffen.klassert@secunet.com>
Wed, 29 Jun 2011 23:19:32 +0000 (23:19 +0000)
committerWilly Tarreau <w@1wt.eu>
Sun, 24 May 2015 08:10:47 +0000 (10:10 +0200)
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>
net/ipv4/ip_output.c

index faa662396bc8c1a66864f5bea6b8dd183e4d94f0..bd5c4b388129bd00c0279e6e54f7affd6f4b8edc 100644 (file)
@@ -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);