In several cases port masking algorithm borrowed
from networking_ovs_dpdk didn't behave correctly.
This caused non-restricted ports to be open due to
wrong tp_src field value in resulting ovs rules.
This was fixed by alternative port masking
implementation.
Functional and unit tests to cover the bug added as well.
Co-Authored-By: Jakub Libosvar <libosvar@redhat.com>
Co-Authored-By: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Closes-Bug: #1611991
Conflicts:
neutron/common/utils.py
neutron/tests/unit/common/test_utils.py
(cherry-picked from 0494f212aa)
Change-Id: Idfc0e9c52e0dd08852c91c17e12edb034606a361