@@ -5038,6 +5038,27 @@ DEFUN(no_bgp_fast_convergence, no_bgp_fast_convergence_cmd,
5038
5038
return CMD_SUCCESS;
5039
5039
}
5040
5040
5041
+ DEFPY (bgp_ipv6_auto_ra,
5042
+ bgp_ipv6_auto_ra_cmd,
5043
+ "[no] bgp ipv6-auto-ra",
5044
+ NO_STR
5045
+ BGP_STR
5046
+ "Allow enabling IPv6 ND RA sending\n")
5047
+ {
5048
+ if (vty->node == CONFIG_NODE) {
5049
+ struct listnode *node, *nnode;
5050
+ struct bgp *bgp;
5051
+
5052
+ COND_FLAG(bm->flags, BM_FLAG_IPV6_NO_AUTO_RA, no);
5053
+ for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp))
5054
+ COND_FLAG(bgp->flags, BGP_FLAG_IPV6_NO_AUTO_RA, no);
5055
+ } else {
5056
+ VTY_DECLVAR_CONTEXT(bgp, bgp);
5057
+ COND_FLAG(bgp->flags, BGP_FLAG_IPV6_NO_AUTO_RA, no);
5058
+ }
5059
+ return CMD_SUCCESS;
5060
+ }
5061
+
5041
5062
static int peer_conf_interface_get(struct vty *vty, const char *conf_if,
5042
5063
int v6only,
5043
5064
const char *peer_group_name,
@@ -19385,6 +19406,9 @@ int bgp_config_write(struct vty *vty)
19385
19406
if (CHECK_FLAG(bm->flags, BM_FLAG_SEND_EXTRA_DATA_TO_ZEBRA))
19386
19407
vty_out(vty, "bgp send-extra-data zebra\n");
19387
19408
19409
+ if (CHECK_FLAG(bm->flags, BM_FLAG_IPV6_NO_AUTO_RA))
19410
+ vty_out(vty, "no bgp ipv6-auto-ra\n");
19411
+
19388
19412
/* DSCP value for outgoing packets in BGP connections */
19389
19413
if (bm->ip_tos != IPTOS_PREC_INTERNETCONTROL)
19390
19414
vty_out(vty, "bgp session-dscp %u\n", bm->ip_tos >> 2);
@@ -19801,6 +19825,11 @@ int bgp_config_write(struct vty *vty)
19801
19825
if (CHECK_FLAG(bgp->flags, BGP_FLAG_SHUTDOWN))
19802
19826
vty_out(vty, " bgp shutdown\n");
19803
19827
19828
+ /* Automatic RA enabling by BGP */
19829
+ if (!CHECK_FLAG(bm->flags, BM_FLAG_IPV6_NO_AUTO_RA))
19830
+ if (CHECK_FLAG(bgp->flags, BGP_FLAG_IPV6_NO_AUTO_RA))
19831
+ vty_out(vty, " no bgp ipv6-auto-ra\n");
19832
+
19804
19833
if (bgp->allow_martian)
19805
19834
vty_out(vty, " bgp allow-martian-nexthop\n");
19806
19835
@@ -20341,6 +20370,12 @@ void bgp_vty_init(void)
20341
20370
install_element(BGP_NODE, &bgp_fast_convergence_cmd);
20342
20371
install_element(BGP_NODE, &no_bgp_fast_convergence_cmd);
20343
20372
20373
+ /* global bgp ipv6-auto-ra command */
20374
+ install_element(CONFIG_NODE, &bgp_ipv6_auto_ra_cmd);
20375
+
20376
+ /* bgp ipv6-auto-ra command */
20377
+ install_element(BGP_NODE, &bgp_ipv6_auto_ra_cmd);
20378
+
20344
20379
/* global bgp update-delay command */
20345
20380
install_element(CONFIG_NODE, &bgp_global_update_delay_cmd);
20346
20381
install_element(CONFIG_NODE, &no_bgp_global_update_delay_cmd);
0 commit comments