summaryrefslogtreecommitdiff
path: root/zebra/rtadv.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/rtadv.c')
-rw-r--r--zebra/rtadv.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 860e8710d6..d0b821bfd2 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -801,8 +801,7 @@ static void ipv6_nd_suppress_ra_set(struct interface *ifp,
* if the operator has explicitly enabled RA. The enable request can also
* specify a RA interval (in seconds).
*/
-void zebra_interface_radv_set(struct zserv *client, u_short length,
- struct zebra_vrf *zvrf, int enable)
+static void zebra_interface_radv_set(ZAPI_HANDLER_ARGS, int enable)
{
struct stream *s;
ifindex_t ifindex;
@@ -810,7 +809,7 @@ void zebra_interface_radv_set(struct zserv *client, u_short length,
struct zebra_if *zif;
int ra_interval;
- s = client->ibuf;
+ s = msg;
/* Get interface index and RA interval. */
STREAM_GETL(s, ifindex);
@@ -842,9 +841,9 @@ void zebra_interface_radv_set(struct zserv *client, u_short length,
SET_FLAG(zif->rtadv.ra_configured, BGP_RA_CONFIGURED);
ipv6_nd_suppress_ra_set(ifp, RA_ENABLE);
if (ra_interval
- && (ra_interval * 1000) < zif->rtadv.MaxRtrAdvInterval
- && !CHECK_FLAG(zif->rtadv.ra_configured,
- VTY_RA_INTERVAL_CONFIGURED))
+ && (ra_interval * 1000) < zif->rtadv.MaxRtrAdvInterval
+ && !CHECK_FLAG(zif->rtadv.ra_configured,
+ VTY_RA_INTERVAL_CONFIGURED))
zif->rtadv.MaxRtrAdvInterval = ra_interval * 1000;
} else {
UNSET_FLAG(zif->rtadv.ra_configured, BGP_RA_CONFIGURED);
@@ -859,6 +858,15 @@ stream_failure:
return;
}
+void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS)
+{
+ zebra_interface_radv_set(client, hdr, msg, zvrf, 0);
+}
+void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS)
+{
+ zebra_interface_radv_set(client, hdr, msg, zvrf, 1);
+}
+
DEFUN (ipv6_nd_suppress_ra,
ipv6_nd_suppress_ra_cmd,
"ipv6 nd suppress-ra",