...
 
Commits (2)
options ipv6 autoconf=0
......@@ -144,7 +144,7 @@ if_up() {
[ -n "${BRNICS[$i]}" ] && br_open $i
# Skip unconfigured interfaces:
if [ -z "${IPADDR[$i]}" ] && [ "${USE_DHCP[$i]}" != "yes" ] && [ -z "${IPADDR6[$i]}" ] && \
[ "${USE_DHCP6[$i]}" != "yes" ] && [ "${USE_AUTOCONF6[$i]}" != "yes" ]; then
[ "${USE_DHCP6[$i]}" != "yes" ] && [ "${USE_SLAAC[$i]}" != "yes" ]; then
debug_log "skipping ${1} early, interface is not configured in /etc/rc.d/rc.inet1.conf"
return
fi
......@@ -204,7 +204,7 @@ if_up() {
/sbin/ip link set dev ${1} down
fi
fi
if [ "${USE_DHCP6[$i]}" != "yes" ] && [ "${USE_AUTOCONF6[$i]}" = "yes" ]; then # configure interface via stateless auto config
if [ "${USE_DHCP6[$i]}" != "yes" ] && [ "${USE_SLAAC[$i]}" = "yes" ]; then # configure interface via stateless auto config
echo "/etc/rc.d/rc.inet1: using Router Advertisement stateless auto configuration for ${1}" | $LOGGER
# Enable accepting of router advertisment packets, and auto configuration of interfaces:
echo "1" >/proc/sys/net/ipv6/conf/$1/accept_ra
......@@ -243,13 +243,13 @@ if_up() {
/sbin/ip link set dev ${1} down
fi
fi
if [ "${USE_DHCP6[$i]}" != "yes" ] && [ "${USE_AUTOCONF6[$i]}" != "yes" ] && [ -n "${IPADDR6[$i]}" ]; then # add a fixed v6 IP
if [ -z "${PREFIX6[$i]}" ]; then
echo "/etc/rc.d/rc.inet1: no PREFIX6 set for ${1} - assuming 64" | $LOGGER
PREFIX6[$i]="64"
if [ "${USE_DHCP6[$i]}" != "yes" ] && [ "${USE_SLAAC[$i]}" != "yes" ] && [ -n "${IPADDR6[$i]}" ]; then # add a fixed v6 IP
if [ -z "${PREFIXLEN[$i]}" ]; then
echo "/etc/rc.d/rc.inet1: no PREFIXLEN set for ${1} - assuming 64" | $LOGGER
PREFIXLEN[$i]="64"
fi
echo "/etc/rc.d/rc.inet1: /sbin/ip -6 address add ${IPADDR6[$i]}/${PREFIX6[$i]#/} dev ${1}" | $LOGGER
if /sbin/ip -6 address add ${IPADDR6[$i]}/${PREFIX6[$i]#/} dev ${1} && \
echo "/etc/rc.d/rc.inet1: /sbin/ip -6 address add ${IPADDR6[$i]}/${PREFIXLEN[$i]#/} dev ${1}" | $LOGGER
if /sbin/ip -6 address add ${IPADDR6[$i]}/${PREFIXLEN[$i]#/} dev ${1} && \
/sbin/ip link set dev ${1} up; then
IF_UP=1
else
......
......@@ -11,54 +11,70 @@
# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.
# Important note for IPv6 stateless autoconfiguration (SLAAC) users:
# From Slackware 15.0 onwards, you need to set USE_SLAAC[0]="yes" (etc) below
# =============================================================================
# Config information for eth0:
# IPv4 config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
IPALIASES[0]=""
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
# Config information for eth1:
# IPv4 config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
IPALIASES[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""
# Config information for eth2:
# IPv4 config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
IPALIASES[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""
# Config information for eth3:
# IPv4 config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
IPALIASES[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""
# Default gateway IP address:
# IPv4 default gateway IP address:
GATEWAY=""
# IPv6 configuration options:
#IPADDR6[0]=
#PREFIX6[0]=
#IPALIASES6[0]=
#USE_DHCP6[0]=
#USE_AUTOCONF6[0]=
# =============================================================================
# IPv6 config information for eth0:
IPADDR6[0]=""
PREFIXLEN[0]=""
IPALIASES6[0]=""
USE_SLAAC[0]=""
USE_DHCP6[0]=""
# IPv6 config information for eth1:
IPADDR6[1]=""
PREFIXLEN[1]=""
IPALIASES6[1]=""
USE_SLAAC[1]=""
USE_DHCP6[1]=""
# Default gateway IPv6 address:
#GATEWAY6=""
# IPv6 default gateway address:
GATEWAY6=""
# =============================================================================
# Change this to "yes" for debugging output to stdout. Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"
# =============================================================================
# Example of how to configure a bridge:
# Note the added "BRNICS" variable which contains a space-separated list
# of the physical or virtual network interfaces you want to add to the bridge.
......@@ -70,6 +86,8 @@ DEBUG_ETH_UP="no"
#USE_DHCP[0]=""
#DHCP_HOSTNAME[0]=""
# =============================================================================
# Virtual interfaces to create - these are created before any address
# configuration or bridge setup is done, so you may use these interfaces
# as IFNAME or BRNICS values. These can be tun or tap interfaces:
......@@ -89,6 +107,8 @@ DEBUG_ETH_UP="no"
#VIRTIFUSER[1]="someuser"
#VIRTIFGROUP[1]="somegroup"
# =============================================================================
## Example config information for wlan0. Uncomment the lines you need and fill
## in your data. (You may not need all of these for your wireless network)
#IFNAME[4]="wlan0"
......@@ -110,6 +130,8 @@ DEBUG_ETH_UP="no"
#WLAN_WPADRIVER[4]="wext"
#WLAN_WPAWAIT[4]=30
# =============================================================================
## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0" # Use a different interface name instead of
......@@ -135,9 +157,9 @@ DEBUG_ETH_UP="no"
# server is not found (ipv4ll link-local
# adresses in the IP range 169.254.0.0/16 are
# also known as "zeroconf" addresses)
#AUTOCONF6_TIMEOUT[4]="15" # The default timeout for auto configuration to
# wait for the interface to come up is 15 sec.
# Increase the timeout if required.
#AUTOCONF6_TIMEOUT[4]="15" # The default timeout for auto configuration to
# wait for the interface to come up is 15 sec.
# Increase the timeout if required.
#WLAN_ESSID[4]=DARKSTAR # An example of how you can override _any_
# parameter defined in rc.wireless.conf, by
# prepending 'WLAN_' to the parameter's name.
......