All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Avoid gretap fragmentation with nftables on bridge
@ 2020-05-06  9:46 Michael Braun
  2020-05-06  9:46 ` [PATCH 1/3] nftables: add frag-needed (ipv4) to reject options Michael Braun
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Michael Braun @ 2020-05-06  9:46 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Michael Braun

Hi,

I have a bridge with connects an gretap tunnel with some ethernet lan.
On the gretap device I use ignore-df to avoid packets being lost without
icmp reject to the sender of the bridged packet.

Still I want to avoid packet fragmentation with the gretap packets.
So I though about adding an nftables rule like this:

nft insert rule bridge filter FORWARD \
  ip protocol tcp \
  ip length > 1400 \
  ip frag-off & 0x4000 != 0 \
  reject with icmp type frag-needed

This would reject all tcp packets with ip dont-fragment bit set that are
bigger than some threshold (here 1400 bytes). The sender would then receive
ICMP unreachable - fragmentation needed and reduce its packet size (as
defined with PMTU).

This patch series
 1. adds frag-needed ipv4 flag to nftables
 2. enables to use this with bridge vlans.

For IPv6, this would need ICMPV6_PKT_TOOBIG instead of ICMPV6_DEST_UNREACH
in nft_reject_br_send_v6_unreach, so this is not part of this series.

Regards,
M. Braun

-- 
2.20.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-27 21:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-06  9:46 [PATCH 0/3] Avoid gretap fragmentation with nftables on bridge Michael Braun
2020-05-06  9:46 ` [PATCH 1/3] nftables: add frag-needed (ipv4) to reject options Michael Braun
2020-05-06  9:46 ` [PATCH 2/3] nftables: enable reject with 802.1q Michael Braun
2020-05-06  9:46 ` [PATCH 3/3] netfilter: enable reject with bridge vlan Michael Braun
2020-05-25 18:40   ` Pablo Neira Ayuso
2020-05-27 21:39 ` [PATCH 0/3] Avoid gretap fragmentation with nftables on bridge Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.