diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-05-03 09:13:29 (GMT) |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-05-05 14:39:50 (GMT) |
commit | 3b78155b1b3688dbe910fecdc3e003f431b46630 (patch) | |
tree | 4fb6b1313ffc2e25acdc895c452dbb27f787ca84 /net/openvswitch/conntrack.c | |
parent | 71d8c47fc653711c41bc3282e5b0e605b3727956 (diff) | |
download | linux-3b78155b1b3688dbe910fecdc3e003f431b46630.tar.xz |
openvswitch: __nf_ct_l{3,4}proto_find() always return a valid pointer
If the protocol is not natively supported, this assigns generic protocol
tracker so we can always assume a valid pointer after these calls.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Joe Stringer <joe@ovn.org>
Diffstat (limited to 'net/openvswitch/conntrack.c')
-rw-r--r-- | net/openvswitch/conntrack.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 9741a76..9f0bc49 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c @@ -439,20 +439,12 @@ ovs_ct_find_existing(struct net *net, const struct nf_conntrack_zone *zone, u8 protonum; l3proto = __nf_ct_l3proto_find(l3num); - if (!l3proto) { - pr_debug("ovs_ct_find_existing: Can't get l3proto\n"); - return NULL; - } if (l3proto->get_l4proto(skb, skb_network_offset(skb), &dataoff, &protonum) <= 0) { pr_debug("ovs_ct_find_existing: Can't get protonum\n"); return NULL; } l4proto = __nf_ct_l4proto_find(l3num, protonum); - if (!l4proto) { - pr_debug("ovs_ct_find_existing: Can't get l4proto\n"); - return NULL; - } if (!nf_ct_get_tuple(skb, skb_network_offset(skb), dataoff, l3num, protonum, net, &tuple, l3proto, l4proto)) { pr_debug("ovs_ct_find_existing: Can't get tuple\n"); |