options--;
}
- if (mutable->port_config.flags & GRE_F_OUT_CSUM) {
+ if (mutable->port_config.flags & GRE_F_CSUM) {
greh->flags |= GRE_CSUM;
*options = 0;
!!(mutable->port_config.flags & GRE_F_OUT_KEY_ACTION))
return;
- if ((mutable->port_config.flags & GRE_F_OUT_CSUM) && !(flags & GRE_CSUM))
+ if ((mutable->port_config.flags & GRE_F_CSUM) && !(flags & GRE_CSUM))
return;
tunnel_hdr_len += iph->ihl << 2;
goto error;
}
- if ((mutable->port_config.flags & GRE_F_IN_CSUM) && !(flags & GRE_CSUM)) {
- vport_record_error(vport, VPORT_E_RX_CRC);
- goto error;
- }
-
if (!pskb_pull(skb, hdr_len) || !pskb_may_pull(skb, ETH_HLEN)) {
vport_record_error(vport, VPORT_E_RX_ERROR);
goto error;
mutable->tunnel_hlen = sizeof(struct iphdr) + GRE_HEADER_SECTION;
- if (mutable->port_config.flags & GRE_F_OUT_CSUM)
+ if (mutable->port_config.flags & GRE_F_CSUM)
mutable->tunnel_hlen += GRE_HEADER_SECTION;
if (mutable->port_config.out_key ||
#include <linux/types.h>
-#define GRE_F_IN_CSUM (1 << 0) /* Require incoming packets to have checksums. */
-#define GRE_F_OUT_CSUM (1 << 1) /* Checksum outgoing packets. */
+#define GRE_F_CSUM (1 << 1) /* Checksum packets. */
#define GRE_F_IN_KEY_MATCH (1 << 2) /* Store the key in tun_id to match in flow table. */
#define GRE_F_OUT_KEY_ACTION (1 << 3) /* Get the key from a SET_TUNNEL action. */
#define GRE_F_TOS_INHERIT (1 << 4) /* Inherit the ToS from the inner packet. */
}
} else if (!strcmp(node->name, "csum")) {
if (!strcmp(node->data, "true")) {
- config->flags |= GRE_F_IN_CSUM;
- config->flags |= GRE_F_OUT_CSUM;
+ config->flags |= GRE_F_CSUM;
}
} else if (!strcmp(node->name, "pmtud")) {
if (!strcmp(node->data, "false")) {
</dl>
<dl>
<dt><code>csum</code></dt>
- <dd>Optional. Compute GRE checksums for outgoing packets and
- require checksums for incoming packets. Note that GRE checksums
+ <dd>Optional. Compute GRE checksums on outgoing packets.
+ Checksums present on incoming packets will be validated
+ regardless of this setting. Note that GRE checksums
impose a significant performance penalty as they cover the
entire packet. As the contents of the packet is typically
covered by L3 and L4 checksums, this additional checksum only