From: Pablo Neira Ayuso <pa...@netfilter.org> Upstream commit: commit 3b78155b1b3688dbe910fecdc3e003f431b46630 Author: Pablo Neira Ayuso <pa...@netfilter.org> Date: Tue May 3 11:13:29 2016 +0200
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 <pa...@netfilter.org> Acked-by: Jarno Rajahalme <jrajaha...@nicira.com> Acked-by: Joe Stringer <j...@ovn.org> Signed-off-by: Jarno Rajahalme <ja...@ovn.org> Signed-off-by: Jarno Rajahalme <ja...@ovn.org> --- datapath/conntrack.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/datapath/conntrack.c b/datapath/conntrack.c index 236e203..885f187 100644 --- a/datapath/conntrack.c +++ b/datapath/conntrack.c @@ -450,20 +450,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"); -- 2.1.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev