]> git.proxmox.com Git - mirror_ovs.git/commitdiff
OVN: update RA next_announce according to {min, max}_interval
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Mon, 4 Mar 2019 16:14:14 +0000 (17:14 +0100)
committerBen Pfaff <blp@ovn.org>
Mon, 4 Mar 2019 16:46:34 +0000 (08:46 -0800)
Update RA next_announce whenever min_interval and/or max_interval are
updated in sbrec_port_binding option. In the current implementation
if ipv6_ra_configs:send_periodic is set to true before setting
ipv6_ra_configs:{min,max}_interval, next_announce will be set using
default values and it will not be updated until we send the first IPv6
router advertisement

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
ovn/controller/pinctrl.c

index 655a85f7401b0c3e14406de1f75f2e211cd3eb29..100a20ff20416ec76cb7b02ca91553f1dea41189 100644 (file)
@@ -1823,6 +1823,11 @@ send_ipv6_ras(struct ovsdb_idl_index *sbrec_port_binding_by_datapath,
                     ra->config->max_interval);
                 shash_add(&ipv6_ras, pb->logical_port, ra);
             } else {
+                if (config->min_interval != ra->config->min_interval ||
+                    config->max_interval != ra->config->max_interval)
+                    ra->next_announce = ipv6_ra_calc_next_announce(
+                        config->min_interval,
+                        config->max_interval);
                 ipv6_ra_config_delete(ra->config);
                 ra->config = config;
             }