summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove hard coded -L from dhcpcd command lineDarren 'Tadgy' Austin2018-11-261-4/+2
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Added USE_RA[x] option to explicitly enable/disable RA supportDarren 'Tadgy' Austin2018-11-262-3/+14
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Protect blocks of code by testing whether ipv6 is activeDarren 'Tadgy' Austin2018-11-251-20/+30
| | | | | | | | | | 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>
* Various fixups for nomenclature - see full commit messageDarren 'Tadgy' Austin2018-11-252-33/+54
| | | | | | | | | | | | | | | | * 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>
* Move interface module loading into a 'pre-load' sectionDarren 'Tadgy' Austin2018-11-251-9/+21
| | | | | | | | | 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>
* Mitigate a race condition with Duplicate Address DetectionDarren 'Tadgy' Austin2018-11-251-4/+12
| | | | | | | | | | 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>
* rc.inet1: sleep for 3 seconds after setting all the interface options/IPsDarren 'Tadgy' Austin2018-11-251-0/+4
| | | | | | | | | | | 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>
* Update rc.inet1.conf with IPv6 optionsDarren 'Tadgy' Austin2018-11-251-1/+14
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Added ipv6 gateway up/down functionDarren 'Tadgy' Austin2018-11-251-4/+15
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Added support for AUTOCONF6_TIMEOUT[x] optionDarren 'Tadgy' Austin2018-11-251-4/+5
| | | | | | Removed unneeded sleep when taking interface down Signed-off-by: Robby Workman <rworkman@slackware.com>
* Move AUTOCONF6 block to favour dynamic configuration over fixed IPDarren 'Tadgy' Austin2018-11-251-25/+23
| | | | | | This is more in line with Slackware tradition Signed-off-by: Robby Workman <rworkman@slackware.com>
* Flush and down interface if configuration failsDarren 'Tadgy' Austin2018-11-251-2/+12
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Various fixes and enhancements (see full commit message)Darren 'Tadgy' Austin2018-11-251-67/+63
| | | | | | | | | | | | | | | * 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>
* Use -4 when querying/setting routesDarren 'Tadgy' Austin2018-11-251-4/+5
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Increase sleep time after dhcpcd is killedDarren 'Tadgy' Austin2018-11-251-0/+1
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* USE_STATELESS->USE_STATELESS6 - D'oh. Some bugfixes alsoDarren 'Tadgy' Austin2018-11-251-11/+10
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Finish up dhcp start blockDarren 'Tadgy' Austin2018-11-251-4/+6
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Only add IPALIASES{,6} if the interface came upDarren 'Tadgy' Austin2018-11-251-21/+23
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Modified interface takedown code in if_down()Darren 'Tadgy' Austin2018-11-251-11/+27
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Changed if_up logic to allow interfaces to be configured by any methodDarren 'Tadgy' Austin2018-11-251-35/+43
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Add checks to enable -4 or -6 options to dhcpcdDarren 'Tadgy' Austin2018-11-251-0/+5
| | | | | | This begins addressing concerns raised in af0a481ef072d220a58e Signed-off-by: Robby Workman <rworkman@slackware.com>
* Change DHCP_OPTIONS into an arrayDarren 'Tadgy' Austin2018-11-251-9/+10
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Removed old code and comments from dhcp sectionDarren 'Tadgy' Austin2018-11-251-32/+2
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Clean up commentary output and commentsDarren 'Tadgy' Austin2018-11-251-20/+29
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Update early skipping of unconfigured interfaces checkDarren 'Tadgy' Austin2018-11-251-3/+5
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Added IPALIASES setting for v4 and v6; removed old IPALIASES codeDarren 'Tadgy' Austin2018-11-251-11/+22
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Add fixed IP configuration blockDarren 'Tadgy' Austin2018-11-251-10/+25
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Move set of PROMISCIOUS mode to end of interface config blockDarren 'Tadgy' Austin2018-11-251-8/+3
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Set MTU after interface is up (override dhcp server)Darren 'Tadgy' Austin2018-11-251-4/+4
| | | | | | | 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>
* Consider SLAAC IPs when determining interface up statusDarren 'Tadgy' Austin2018-11-251-1/+1
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Return immediately if interface has no defined config in rc.inet1.confDarren 'Tadgy' Austin2018-11-251-0/+1
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Add stateless RA auto configuration blockDarren 'Tadgy' Austin2018-11-251-0/+10
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Set autoconf to 0 for dhcp/fixed IP, 1 for stateless autoconfigDarren 'Tadgy' Austin2018-11-251-6/+5
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Don't unconditionally bring interface upDarren 'Tadgy' Austin2018-11-251-3/+0
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Account for IPv6 options in interface configuration logicDarren 'Tadgy' Austin2018-11-251-2/+6
| | | | | | | 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>
* Flush bridge interface address before destroying itDarren 'Tadgy' Austin2018-11-251-2/+2
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Added code to enable/disable v6 autoconf for an interfaceDarren 'Tadgy' Austin2018-11-251-0/+8
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Account for IPv6 addresses in determination of interface statusDarren 'Tadgy' Austin2018-11-251-2/+2
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Removed trailing whitespaces to kill ugly highlights in nanoDarren 'Tadgy' Austin2018-11-251-2/+2
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* Fix up setting of IPALIASES and update docscurrent-20180531Darren Austin2018-05-245-9/+27
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* rc.inet1*: Allow setting an interface in promiscuous modeDarren Austin2018-05-242-7/+18
| | | | | | | This is needed for container networking - the bridge for it must be in promiscuous mode. Signed-off-by: Robby Workman <rworkman@slackware.com>
* More consistent loggingJakub Jankowski2018-05-241-2/+2
| | | | Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
* Quote variables in testsJakub Jankowski2018-05-241-3/+3
| | | | Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
* Use pkill/pgrepJakub Jankowski2018-05-241-4/+2
| | | | | | | Instead of heavy subshelling, use pkill/pgrep. Also, be a bit more specific on what we're killing. Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
* Replace -a / -o in conditionals with && / ||Jakub Jankowski2018-05-241-3/+3
| | | | | | | | | Conditional expression like [ test1 -a test2 ] should be avoided as it is not well defined. See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128_16 and https://github.com/koalaman/shellcheck/wiki/SC2166 Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
* Take HWADDR from sysfsJakub Jankowski2018-05-241-1/+1
| | | | | | | Instead of "ip | sed", just read the sysfs file in which hardware address is readily presented for us. Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
* is_wireless_device: fix UUoC and reorderJakub Jankowski2018-05-241-3/+3
| | | | | | | | | | | | | There's no need to $(cat .../uevent | grep DEVTYPE) and then compare it to what we're looking for. grep can do all of it for us ("Useless Use of Cat"). While at it, if we have three ways of checking whether a device is wireless, let's order them from least expensive (checking dir is only one stat()) to most expensive (iwconfig | grep). Proof of correctness: if "iwconfig | grep" is returning true and the other two methods are not, we will still reach "iwconfig | grep" in the series of if/elif. Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
* netconfig: formatting tweaks plus fixup NM default usagePatrick J. Volkerding2018-05-241-24/+29
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>
* rc.inet1: set the bcast addr and flush ip addr on shutdowncurrent-20180318Robby Workman2018-03-181-2/+4
| | | | | | Thanks to Markus Wiesner. Signed-off-by: Robby Workman <rworkman@slackware.com>
* netconfig: Don't write hostname to NM config file any moreAndrzej Telszewski2018-03-181-4/+0
| | | | Signed-off-by: Robby Workman <rworkman@slackware.com>