ip6-nd: initialize radv_info->send_radv to 1 60/37560/3
authorDave Barach <dave@barachs.net>
Sun, 30 Oct 2022 20:45:24 +0000 (16:45 -0400)
committerMatthew Smith <mgsmith@netgate.com>
Sat, 5 Nov 2022 19:11:12 +0000 (19:11 +0000)
Otherwise, the newly configured interface will never send RADV's.

See below. In the typical case, suppress = 0 and is_no = 0, which
propagates the current value of radv->send_radv:

  radv_info->send_radv =
    (suppress != 0) ? ((is_no != 0) ? 1 : 0) : radv_info->send_radv;

No other bit of code will set send_radv, at least in straightforward
ways.

Type:fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: If9368155f7676460ca1f87729c2b3c453405d08d

src/vnet/ip6-nd/ip6_ra.c

index 53f5a41..8cd7ab9 100644 (file)
@@ -1700,6 +1700,9 @@ ip6_ra_config (vlib_main_t * vm, u32 sw_if_index,
   if (!radv_info)
     return (VNET_API_ERROR_IP6_NOT_ENABLED);
 
+  /* Start off believing that we're going to send radv's */
+  radv_info->send_radv = 1;
+
   if ((max_interval != 0) && (min_interval == 0))
     min_interval = .75 * max_interval;