#include <linux/kconfig.h>
#include <linux/version.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(3,9,0) && \
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) && \
IS_ENABLED(CONFIG_NF_CONNTRACK)
#include <linux/module.h>
#include "conntrack.h"
#include "flow.h"
#include "flow_netlink.h"
+#include "gso.h"
struct ovs_ct_len_tbl {
size_t maxlen;
* previously sent the packet to conntrack via the ct action.
*/
static void ovs_ct_update_key(const struct sk_buff *skb,
+ const struct ovs_conntrack_info *info,
struct sw_flow_key *key, bool post_ct)
{
const struct nf_conntrack_zone *zone = &nf_ct_zone_dflt;
zone = nf_ct_zone(ct);
} else if (post_ct) {
state = OVS_CS_F_TRACKED | OVS_CS_F_INVALID;
+ if (info)
+ zone = &info->zone;
}
__ovs_ct_update_key(key, state, zone, ct);
}
void ovs_ct_fill_key(const struct sk_buff *skb, struct sw_flow_key *key)
{
- ovs_ct_update_key(skb, key, false);
+ ovs_ct_update_key(skb, NULL, key, false);
}
int ovs_ct_put_key(const struct sw_flow_key *key, struct sk_buff *skb)
static int handle_fragments(struct net *net, struct sw_flow_key *key,
u16 zone, struct sk_buff *skb)
{
- struct ovs_skb_cb ovs_cb = *OVS_CB(skb);
+ struct ovs_gso_cb ovs_cb = *OVS_GSO_CB(skb);
if (!skb->dev) {
OVS_NLERR(true, "%s: skb has no dev; dropping", __func__);
if (err)
return err;
- ovs_cb.mru = IPCB(skb)->frag_max_size;
+ ovs_cb.dp_cb.mru = IPCB(skb)->frag_max_size;
#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
} else if (key->eth.type == htons(ETH_P_IPV6)) {
enum ip6_defrag_users user = IP6_DEFRAG_CONNTRACK_IN + zone;
skb_morph(skb, reasm);
skb->next = reasm->next;
consume_skb(reasm);
- ovs_cb.mru = IP6CB(skb)->frag_max_size;
+ ovs_cb.dp_cb.mru = IP6CB(skb)->frag_max_size;
#endif /* IP frag support */
} else {
kfree_skb(skb);
key->ip.frag = OVS_FRAG_TYPE_NONE;
skb_clear_hash(skb);
skb->ignore_df = 1;
- *OVS_CB(skb) = ovs_cb;
+ *OVS_GSO_CB(skb) = ovs_cb;
return 0;
}
}
}
- ovs_ct_update_key(skb, key, true);
+ ovs_ct_update_key(skb, info, key, true);
return 0;
}
nf_connlabels_put(net);
}
-#endif /* CONFIG_NF_CONNTRACK && LINUX > 3.9 */
+#endif /* CONFIG_NF_CONNTRACK && LINUX > 3.10 */