[ovs-dev] [PATCH] ovn: Detect and prevent duplicate address assignments.

Ben Pfaff blp at ovn.org
Thu Aug 30 21:30:57 UTC 2018


On Wed, Aug 22, 2018 at 03:04:44PM -0400, Mark Michelson wrote:
> This patch alters the 'ovn-nbctl lsp-set-addresses' command to check if
> the addresses being added are duplicates of already-set addresses. In
> the case of MAC addresses, it compares to all switch ports across the
> logical network. In the case of IP addresses, it only compares to other
> switch ports on the logical switch. Test cases have been added for this
> detection.
> 
> This patch also adds a warning message to ovn-northd if duplicate IPv4
> addresses are detected on a switch.
> 
> Signed-off-by: Mark Michelson <mmichels at redhat.com>

sparse complains:

../ovn/northd/ovn-northd.c:950:13: error: incorrect type in argument 1 (different base types)
../ovn/northd/ovn-northd.c:950:13:    expected restricted ovs_be32 [usertype] x
../ovn/northd/ovn-northd.c:950:13:    got restricted ovs_be16
../ovn/northd/ovn-northd.c:950:13: error: incorrect type in argument 1 (different base types)
../ovn/northd/ovn-northd.c:950:13:    expected restricted ovs_be32 [usertype] x
../ovn/northd/ovn-northd.c:950:13:    got restricted ovs_be16
../ovn/northd/ovn-northd.c:950:13: error: incorrect type in argument 1 (different base types)
../ovn/northd/ovn-northd.c:950:13:    expected restricted ovs_be32 [usertype] x
../ovn/northd/ovn-northd.c:950:13:    got restricted ovs_be16
../ovn/northd/ovn-northd.c:950:13: error: incorrect type in argument 1 (different base types)
../ovn/northd/ovn-northd.c:950:13:    expected restricted ovs_be32 [usertype] x
../ovn/northd/ovn-northd.c:950:13:    got restricted ovs_be16


More information about the dev mailing list