@@ -1243,6 +1243,25 @@ DEFPY_YANG (ipv6_nd_suppress_ra,
1243
1243
return nb_cli_apply_changes (vty , NULL );
1244
1244
}
1245
1245
1246
+ DEFPY_YANG (ipv6_nd_disable_ra ,
1247
+ ipv6_nd_disable_ra_cmd ,
1248
+ "[no] ipv6 nd disable-ra" ,
1249
+ NO_STR
1250
+ "Interface IPv6 config commands\n"
1251
+ "Neighbor discovery\n"
1252
+ "Disable Router Advertisement completely\n" )
1253
+ {
1254
+ if (!no )
1255
+ nb_cli_enqueue_change (vty ,
1256
+ "./frr-zebra:zebra/ipv6-router-advertisements/disable-advertisements" ,
1257
+ NB_OP_MODIFY , "true" );
1258
+ else
1259
+ nb_cli_enqueue_change (vty ,
1260
+ "./frr-zebra:zebra/ipv6-router-advertisements/disable-advertisements" ,
1261
+ NB_OP_DESTROY , NULL );
1262
+ return nb_cli_apply_changes (vty , NULL );
1263
+ }
1264
+
1246
1265
static void
1247
1266
lib_interface_zebra_ipv6_router_advertisements_send_advertisements_cli_write (
1248
1267
struct vty * vty , const struct lyd_node * dnode , bool show_defaults )
@@ -1255,6 +1274,18 @@ lib_interface_zebra_ipv6_router_advertisements_send_advertisements_cli_write(
1255
1274
vty_out (vty , " ipv6 nd suppress-ra\n" );
1256
1275
}
1257
1276
1277
+ static void
1278
+ lib_interface_zebra_ipv6_router_advertisements_disable_advertisements_cli_write (
1279
+ struct vty * vty , const struct lyd_node * dnode , bool show_defaults )
1280
+ {
1281
+ bool disable_advertisements = yang_dnode_get_bool (dnode , NULL );
1282
+
1283
+ if (disable_advertisements )
1284
+ vty_out (vty , " ipv6 nd disable-ra\n" );
1285
+ else if (show_defaults )
1286
+ vty_out (vty , " no ipv6 nd disable-ra\n" );
1287
+ }
1288
+
1258
1289
DEFPY_YANG (ipv6_nd_ra_interval ,
1259
1290
ipv6_nd_ra_interval_cmd ,
1260
1291
"[no] ipv6 nd ra-interval ![<(1-1800)$sec|msec (70-1800000)$msec>]" ,
@@ -2748,6 +2779,10 @@ const struct frr_yang_module_info frr_zebra_cli_info = {
2748
2779
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/send-advertisements" ,
2749
2780
.cbs .cli_show = lib_interface_zebra_ipv6_router_advertisements_send_advertisements_cli_write ,
2750
2781
},
2782
+ {
2783
+ .xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/disable-advertisements" ,
2784
+ .cbs .cli_show = lib_interface_zebra_ipv6_router_advertisements_disable_advertisements_cli_write ,
2785
+ },
2751
2786
{
2752
2787
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/max-rtr-adv-interval" ,
2753
2788
.cbs .cli_show = lib_interface_zebra_ipv6_router_advertisements_max_rtr_adv_interval_cli_write ,
@@ -2913,6 +2948,7 @@ void zebra_cli_init(void)
2913
2948
install_element (INTERFACE_NODE , & ipv6_nd_ra_retrans_interval_cmd );
2914
2949
install_element (INTERFACE_NODE , & ipv6_nd_ra_hop_limit_cmd );
2915
2950
install_element (INTERFACE_NODE , & ipv6_nd_suppress_ra_cmd );
2951
+ install_element (INTERFACE_NODE , & ipv6_nd_disable_ra_cmd );
2916
2952
install_element (INTERFACE_NODE , & ipv6_nd_ra_interval_cmd );
2917
2953
install_element (INTERFACE_NODE , & ipv6_nd_ra_lifetime_cmd );
2918
2954
install_element (INTERFACE_NODE , & ipv6_nd_reachable_time_cmd );
0 commit comments