diff options
author | Mark Michelson <mmichels@redhat.com> | 2019-01-16 10:37:06 -0500 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-01-16 10:46:17 -0800 |
commit | 6f5cc61c07f20452955d5278f0771fbd8af1840c (patch) | |
tree | dabf3ae66ef4b4c6486b198c5ec2c8b82a21fcbd /ovn | |
parent | dcad447342ea30d2806d9df063c7cef6a1b0cb1d (diff) | |
download | openvswitch-6f5cc61c07f20452955d5278f0771fbd8af1840c.tar.gz |
ovn: Add port addresses to IPAM later.
ipam_add_port_adresses() needs to be called after the peer field is set
on the ovn_port structures. This way, addresses taken by peered router
ports will be added to the logical switch's IPAM and therefore will be
barred from assignment to other ports.
Reported-by: Girish Moodalbail <gmoodalbail@nvidia.com>
Signed-off-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovn')
-rw-r--r-- | ovn/northd/ovn-northd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c index 7c91d5385..956b021f8 100644 --- a/ovn/northd/ovn-northd.c +++ b/ovn/northd/ovn-northd.c @@ -1685,7 +1685,6 @@ join_logical_ports(struct northd_context *ctx, } op->od = od; - ipam_add_port_addresses(od, op); tag_alloc_add_existing_tags(tag_alloc_table, nbsp); } } else { @@ -1729,7 +1728,6 @@ join_logical_ports(struct northd_context *ctx, op->lrp_networks = lrp_networks; op->od = od; - ipam_add_port_addresses(op->od, op); const char *redirect_chassis = smap_get(&op->nbrp->options, "redirect-chassis"); @@ -1831,6 +1829,8 @@ join_logical_ports(struct northd_context *ctx, } } } + + ipam_add_port_addresses(op->od, op); } } |