const struct rtable *rt, __be16 *frag_offp,
int tunnel_hlen)
{
- bool df_inherit;
bool pmtud;
__be16 frag_off;
int mtu = 0;
unsigned int packet_length = skb->len - ETH_HLEN;
if (OVS_CB(skb)->tun_key->ipv4_dst) {
- df_inherit = false;
pmtud = false;
frag_off = OVS_CB(skb)->tun_key->tun_flags & OVS_TNL_F_DONT_FRAGMENT ?
htons(IP_DF) : 0;
} else {
- df_inherit = mutable->flags & TNL_F_DF_INHERIT;
pmtud = mutable->flags & TNL_F_PMTUD;
frag_off = mutable->flags & TNL_F_DF_DEFAULT ? htons(IP_DF) : 0;
}
if (skb->protocol == htons(ETH_P_IP)) {
struct iphdr *iph = ip_hdr(skb);
- if (df_inherit)
- frag_off = iph->frag_off & htons(IP_DF);
-
if (pmtud && iph->frag_off & htons(IP_DF)) {
mtu = max(mtu, IP_MIN_MTU);
/* IPv6 requires end hosts to do fragmentation
* if the packet is above the minimum MTU.
*/
- if (df_inherit && packet_length > IPV6_MIN_MTU)
+ if (packet_length > IPV6_MIN_MTU)
frag_off = htons(IP_DF);
if (pmtud) {
/* All public tunnel flags. */
#define TNL_F_PUBLIC (TNL_F_CSUM | TNL_F_TOS_INHERIT | TNL_F_TTL_INHERIT | \
- TNL_F_DF_INHERIT | TNL_F_DF_DEFAULT | TNL_F_PMTUD | \
- TNL_F_IPSEC)
+ TNL_F_DF_DEFAULT | TNL_F_PMTUD | TNL_F_IPSEC)
/**
* struct port_lookup_key - Tunnel port key, used as hash table key.
#define TNL_F_CSUM (1 << 0) /* Checksum packets. */
#define TNL_F_TOS_INHERIT (1 << 1) /* Inherit ToS from inner packet. */
#define TNL_F_TTL_INHERIT (1 << 2) /* Inherit TTL from inner packet. */
-#define TNL_F_DF_INHERIT (1 << 3) /* Inherit DF bit from inner packet. */
+/* Bit 3 was previously used for Don't Fragment inheritance. " */
#define TNL_F_DF_DEFAULT (1 << 4) /* Set DF bit if inherit off or
* not IP. */
/* Bit 6 is reserved since it was previously used for Tunnel header caching. */
if (flags & TNL_F_CSUM) {
smap_add(args, "csum", "true");
}
- if (flags & TNL_F_DF_INHERIT) {
- /* Shouldn't happen as "df_inherit" is no longer supported. However,
- * for completeness we report it if it's there. */
- smap_add(args, "df_inherit", "true");
- }
+
if (!(flags & TNL_F_DF_DEFAULT)) {
smap_add(args, "df_default", "false");
}