summaryrefslogtreecommitdiff
path: root/zebra/rtadv.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@openbsd.org>2018-03-12 22:43:05 -0300
committerGitHub <noreply@github.com>2018-03-12 22:43:05 -0300
commitecef81cea9f2f1df598e4ce8e2e9ff76af55c4dd (patch)
treeee3fcae8e7b085a6938c2f404beead8b15da64e3 /zebra/rtadv.c
parentfac615f43b18bf88ccf78d8b0c20046f73f046a4 (diff)
parent41903a407407bcdf73dbd471dea3f53d2d056b0b (diff)
Merge pull request #1828 from qlyoung/zapi-cleanup
zebra: giant zapi cleanup
Diffstat (limited to 'zebra/rtadv.c')
-rw-r--r--zebra/rtadv.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 5eebca163b..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);
@@ -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",