From f06ee76d41e550794b92c61c3348cc2916ae8617 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sun, 26 Jul 2020 01:24:06 -0600 Subject: [PATCH] implement ipv6-ra executor for controlling ipv6 RA setting on a per-NIC basis --- Makefile | 4 +++- executor-scripts/ipv6-ra | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 executor-scripts/ipv6-ra diff --git a/Makefile b/Makefile index 76f3475..dfdf508 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,9 @@ IFQUERY_OBJ = ${IFQUERY_SRC:.c=.o} IFUPDOWN_SRC = cmd/ifupdown.c IFUPDOWN_OBJ = ${IFUPDOWN_SRC:.c=.o} -EXECUTOR_SCRIPTS = dhcp +EXECUTOR_SCRIPTS = \ + dhcp \ + ipv6-ra CMD_OBJ = ${MULTICALL_OBJ} ${IFQUERY_OBJ} ${IFUPDOWN_OBJ} diff --git a/executor-scripts/ipv6-ra b/executor-scripts/ipv6-ra new file mode 100755 index 0000000..514ca28 --- /dev/null +++ b/executor-scripts/ipv6-ra @@ -0,0 +1,17 @@ +#!/bin/sh + +start() { + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra +} + +stop() { + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra +} + +[ -z "$VERBOSE" ] || set -x + +case "$PHASE" in +up) start $impl ;; +down) stop $impl ;; +*) ;; +esac