[ovs-git] [ovn-org/ovn] 24528a: northd: Fix IPAM IPv4 start address calculation.

Mark Michelson noreply at github.com
Wed Jun 10 06:30:25 UTC 2020

  Branch: refs/heads/master
  Home:   https://github.com/ovn-org/ovn
  Commit: 24528aa34d80b41328f018c43fb610ac3172b3ce
  Author: Mark Michelson <mmichels at redhat.com>
  Date:   2020-06-10 (Wed, 10 Jun 2020)

  Changed paths:
    M northd/ovn-northd.c
    M tests/ovn.at

  Log Message:
  northd: Fix IPAM IPv4 start address calculation.

IPAM assumes the other_config:subnet of the logical switch is a network
address, which can result in unusual address assignments.

As an example, consider the following configuration:

ovn-nbctl set logical_switch ls other_config:subnet= is not a network address of a /29 network, but ovn-northd
doesn't care. ovn-northd starts IP address allocation at, with 7
assignable addresses in the subnet. The first address ( is
reserved for router port use. The first IP addresses to a logical switch
port is, then, and so on.

This patch changes the behavior by using the provided netmask to change
the starting IP address to the network address of the subnet. In the
previous example, the provided would be converted
internally to . Therefore, the first IP address
allocated to a switch port would be Further allocations would
continue up until

Reported at: https://bugzilla.redhat.com/show_bug.cgi?id=1823287

Acked-by: Numan Siddique <numans at ovn.org>
Signed-off-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Numan Siddique <numans at ovn.org>

More information about the git mailing list