From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Maxime Bizon <mbizon@freebox.fr>,
Florian Westphal <fw@strlen.de>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH 3.10 05/18] netfilter: ipv4: defrag: set local_df flag on defragmented skb
Date: Thu, 12 Jun 2014 16:22:09 -0700 [thread overview]
Message-ID: <20140612232213.253947132@linuxfoundation.org> (raw)
In-Reply-To: <20140612232212.960235342@linuxfoundation.org>
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <fw@strlen.de>
commit 895162b1101b3ea5db08ca6822ae9672717efec0 upstream.
else we may fail to forward skb even if original fragments do fit
outgoing link mtu:
1. remote sends 2k packets in two 1000 byte frags, DF set
2. we want to forward but only see '2k > mtu and DF set'
3. we then send icmp error saying that outgoing link is 1500
But original sender never sent a packet that would not fit
the outgoing link.
Setting local_df makes outgoing path test size vs.
IPCB(skb)->frag_max_size, so we will still send the correct
error in case the largest original size did not fit
outgoing link mtu.
Reported-by: Maxime Bizon <mbizon@freebox.fr>
Suggested-by: Maxime Bizon <mbizon@freebox.fr>
Fixes: 5f2d04f1f9 (ipv4: fix path MTU discovery with connection tracking)
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/netfilter/nf_defrag_ipv4.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/net/ipv4/netfilter/nf_defrag_ipv4.c
+++ b/net/ipv4/netfilter/nf_defrag_ipv4.c
@@ -22,7 +22,6 @@
#endif
#include <net/netfilter/nf_conntrack_zones.h>
-/* Returns new sk_buff, or NULL */
static int nf_ct_ipv4_gather_frags(struct sk_buff *skb, u_int32_t user)
{
int err;
@@ -33,8 +32,10 @@ static int nf_ct_ipv4_gather_frags(struc
err = ip_defrag(skb, user);
local_bh_enable();
- if (!err)
+ if (!err) {
ip_send_check(ip_hdr(skb));
+ skb->local_df = 1;
+ }
return err;
}
next prev parent reply other threads:[~2014-06-12 23:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 23:22 [PATCH 3.10 00/18] 3.10.44-stable review Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 01/18] fs,userns: Change inode_capable to capable_wrt_inode_uidgid Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 02/18] mlx4_en: dont use napi_synchronize inside mlx4_en_netpoll Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 03/18] ARM: mvebu: fix NOR bus-width in Armada XP GP Device Tree Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 04/18] ARM: mvebu: fix NOR bus-width in Armada XP OpenBlocks AX3 " Greg Kroah-Hartman
2014-06-12 23:22 ` Greg Kroah-Hartman [this message]
2014-06-12 23:22 ` [PATCH 3.10 06/18] Target/iscsi,iser: Avoid accepting transport connections during stop stage Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 07/18] iser-target: Fix multi network portal shutdown regression Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 08/18] iscsi-target: Fix wrong buffer / buffer overrun in iscsi_change_param_value() Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 09/18] target: Allow READ_CAPACITY opcode in ALUA Standby access state Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 10/18] target: Fix alua_access_state attribute OOPs for un-configured devices Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 11/18] mm: compaction: reset cached scanner pfns before reading them Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 12/18] mm: compaction: detect when scanners meet in isolate_freepages Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 13/18] mm/compaction: make isolate_freepages start at pageblock boundary Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 14/18] auditsc: audit_krule mask accesses need bounds checking Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 15/18] SCSI: megaraid: Use resource_size_t for PCI resources, not long Greg Kroah-Hartman
2014-06-12 23:22 ` [PATCH 3.10 16/18] mei: me: drop harmful wait optimization Greg Kroah-Hartman
2014-06-13 5:45 ` [PATCH 3.10 00/18] 3.10.44-stable review Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140612232213.253947132@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=fw@strlen.de \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mbizon@freebox.fr \
--cc=pablo@netfilter.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).