History

vxlan: Allow configuration of DF behaviour

Allow users to set the IPv4 DF bit in outgoing packets, or to inherit its value from the IPv4 inner header. If the encapsulated protocol is IPv6 and DF is configured to be inherited, always set it. For IPv4, inheriting DF from the inner header was probably intended from the very beginning judging by the comment to vxlan_xmit(), but it wasn't actually implemented -- also because it would have done more harm than good, without handling for ICMP Fragmentation Needed messages. According to RFC 7348, "Path MTU discovery MAY be used". An expired RFC draft, draft-saum-nvo3-pmtud-over-vxlan-05, whose purpose was to describe PMTUD implementation, says that "is a MUST that Vxlan gateways [...] SHOULD set the DF-bit [...]", whatever that means. Given this background, the only sane option is probably to let the user decide, and keep the current behaviour as default. This only applies to non-lwt tunnels: if an external control plane is used, tunnel key will still control the DF flag. v2: - DF behaviour configuration only applies for non-lwt tunnels, move DF setting to if (!info) block in vxlan_xmit_one() (Stephen Hemminger)

Stefano Brivio committed 8 years ago

Commit b4d30691 parent c3a43b93 files · +38 −1Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/if_link.h+9−0
@@ -533,6 +533,7 @@ enum { · 532 unmodified lines
533533 IFLA_VXLAN_LABEL,
534534 IFLA_VXLAN_GPE,
535535 IFLA_VXLAN_TTL_INHERIT,
536+ IFLA_VXLAN_DF,
536537 __IFLA_VXLAN_MAX
537538 };
538539 #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
@@ -542,6 +543,14 @@ struct ifla_vxlan_port_range { · 3 unmodified lines
542543 __be16 high;
543544 };
544545
546+enum ifla_vxlan_df {
547+ VXLAN_DF_UNSET = 0,
548+ VXLAN_DF_SET,
549+ VXLAN_DF_INHERIT,
550+ __VXLAN_DF_END,
551+ VXLAN_DF_MAX = __VXLAN_DF_END - 1,
552+};
553+
545554 /* GENEVE section */
546555 enum {
547556 IFLA_GENEVE_UNSPEC,