| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
|
|
|
| |
This has the effect of allowing someone to disable ipv6 entirely,
and the script do the right thing.
Move the enabling of DAD into the correct section - no idea how
it ended up in the ipv4 block of code. D'oh.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* USE_AUTOCONF->USE_SLAAC to be more consistent with IPv6 terminology
* PREFIX6->PREFIXLEN to be more consistent with IPv6 terminology
Thanks to David Spencer (idlemoor) for the patch to the above
* AUTOCONF_TIMEOUT->SLAAC_TIMEOUT to be consistent with USE_SLAAC change
Since some options for IPv6 no longer end in '6', we can relax the naming
of others, so these make sense: IPADDR6->IP6ADDR ; IPALIASES6->IP6ALIASES
Update to rc.inet1.conf example file - thanks to David Spencer.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
|
|
| |
Also fix loading of interface modules - previously just $i was used,
where it should have been ${i%%:*}
Also added pre-loading of ipv6 module
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
|
|
|
| |
https://www.agwa.name/blog/post/beware_the_ipv6_dad_race_condition
This removes the need to sleep for 3 seconds after setting up the
interfaces, but does mean we lose detection of address clashes on
the inteface - it's a trade off
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In testing here, this was necessary to prevent daemons reporting 'Cannot
assign requested address' for IPv6 addresses when they attempt to bind()
to the interface address. This only seems to affect v6 addresses - v4
addresses seem to be immediately available to bind() - but a 3 second
pause shouldn't hurt given that the other methods of configuration can
block for up to 15 seconds.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
| |
Removed unneeded sleep when taking interface down
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
| |
This is more in line with Slackware tradition
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename rc.inet1.conf options
USE_STATELESS6 -> USE_AUTOCONF6
NETMASK6 -> PREFIX6
* Shell syntax and comment fixes
* Removed some redundant code
* Sleep after loading the network card module to allow it to register
* Added error checking when adding IPs to an interface
* Modify if_down() to bring all types of interface down
* Only do MTU and PROMISC set up if the interface comes up
* No longer skip alias config if using USE_AUTOCONF.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
| |
This begins addressing concerns raised in af0a481ef072d220a58e
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
| |
DHCP may have set the MTU to what the DHCP server advertises,
but our override should take precedence.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
| |
TODO: I (RW) am not convinced that this will behave correctly if the
ipv6 address is static while ipv4 is dynamic, or vice versa.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
| |
This is needed for container networking - the bridge for it
must be in promiscuous mode.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
| |
Thanks to Markus Wiesner.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a slight problem with things like
grep lo: /proc/net/dev
especially with tun/tap devices with can have arbitrary names.
Consider a scenario where you name your tap iface "trololo":
$ grep -c lo: /proc/net/dev
2
$
To fix this (quite hypothetical, but still) problem, instead
of simple grepping in /proc/net/dev, check of sysfs path
existence (/sys/class/net/<interface>).
Same fix in if_up() and if_down() for non-loopback interfaces.
While there, also strip colon-whatever from interface name
(what I think was the original idea behind a construct like
grep $(echo ${1}: | cut -f 1 -d :): /proc/net/dev) by using
parameter expansion: ${1%%:*} will remove the longest suffix
matching ":*", ie. colon-and-everything-after.
This is supported by POSIX:
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
Alternative solution would be to change the grep pattern to
grep '^ *lo:' /proc/net/dev
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
| |
The only places using "num" already clear it with "num=0"
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the correct usage to produce one string from all
elements of an array.
foo[0]=b
foo[1]=a
foo[2]=r
"${foo[@]}" here would mean "b" "a" "r"
"${foo[*]}" however: "b a r", and that's what we mean when
logging it.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code around MAXNICS currently only uses it to populate
first $MAXNICS elements of IFNAME array, which is later
used to match interface name to index used to access all
other arrays.
If you configure IPADDR[6], this code doesn't find a matching
entry in IFNAME but doesn't do anything about it. This works
by accident, because iteration variable "i" stays at "6" after
exiting the loop.
But when you configure IPADDR[7], it will still stay on "6",
and will use ...[6] values to configure that interface, which
is potentially damaging.
Better safe than sorry: let's check for this overflow and do
nothing, instead of potentially doing the wrong thing.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's no reason to have separate cases for
start) ... ;;
up) ... ;;
if they both have the same bodies. Let's combine such cases to avoid
code duplication.
Also, this is that one time where quoting isn't really needed :)
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
| |
Also, replace "ip addr" with "ip address" for consistency
Signed-off-by: Robby Workman <rworkman@slackware.com>
|