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

Mark Michelson noreply at github.com
Tue Jun 9 18:29:00 UTC 2020


  Branch: refs/heads/branch-20.06
  Home:   https://github.com/ovn-org/ovn
  Commit: 8ba2e2811c3774f1177b62a5cd80813a8151ff0b
      https://github.com/ovn-org/ovn/commit/8ba2e2811c3774f1177b62a5cd80813a8151ff0b
  Author: Mark Michelson <mmichels at redhat.com>
  Date:   2020-06-09 (Tue, 09 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=172.16.1.254/29

172.16.1.254 is not a network address of a /29 network, but ovn-northd
doesn't care. ovn-northd starts IP address allocation at 172.16.1.254, with 7
assignable addresses in the subnet. The first address (172.16.1.255) is
reserved for router port use. The first IP addresses to a logical switch
port is 172.16.2.0, then 172.16.2.1, 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 172.16.1.254/29 would be converted
internally to 172.16.1.248/29 . Therefore, the first IP address
allocated to a switch port would be 172.16.1.250. Further allocations would
continue up until 172.16.1.254.

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

Signed-off-by: Mark Michelson <mmichels at redhat.com>


  Commit: 86f64fc106f9dcfb0401a721dbd3065259b3a2dc
      https://github.com/ovn-org/ovn/commit/86f64fc106f9dcfb0401a721dbd3065259b3a2dc
  Author: Mark Michelson <mmichels at redhat.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M NEWS
    M debian/changelog

  Log Message:
  -----------
  Set the release date for 20.06.0

Signed-off-by: Mark Michelson <mmichels at redhat.com>


Compare: https://github.com/ovn-org/ovn/compare/ae8997e7591a...86f64fc106f9


More information about the git mailing list