]> git.proxmox.com Git - mirror_ovs.git/commit
conntrack: Reorder sanity checks in extract_l3_ipvx().
authorDarrell Ball <dlu998@gmail.com>
Tue, 9 Jan 2018 23:44:57 +0000 (15:44 -0800)
committerBen Pfaff <blp@ovn.org>
Wed, 10 Jan 2018 17:24:58 +0000 (09:24 -0800)
commitc8b1ad49da68227a86da432a4adc29d5855b6cdd
treef20c76b05227f2b79bd6a4c232c2455a417e73ab
parentdec0dbbc8a422d682cdb051999386c8d27715d27
conntrack: Reorder sanity checks in extract_l3_ipvx().

The functions extract_l3_ipv4 and extract_l3_ipv6 check for
unsupported ip fragments and return early.  The checks were after
an assignment that would not be needed when early return happens.
This is slightly inefficient, but mostly reads poorly.
Hence, reorder the ip fragment checks before the assignments.

Signed-off-by: Darrell Ball <dlu998@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/conntrack.c