implement ipv6-ra executor for controlling ipv6 RA setting on a per-NIC basis
This commit is contained in:
parent
690190a0b9
commit
f06ee76d41
2 changed files with 20 additions and 1 deletions
4
Makefile
4
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}
|
||||
|
||||
|
|
17
executor-scripts/ipv6-ra
Executable file
17
executor-scripts/ipv6-ra
Executable file
|
@ -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
|
Loading…
Reference in a new issue