summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-10-12Fix whitespace and quotingJouke Witteveen2-5/+5
2012-09-15IPv6 support for PPPoE connections (FS#31380)Jouke Witteveen1-0/+1
This fixes netcfg's share of FS#31380. Proposed by Gala Dragos.
2012-09-15Un-hardcode the interface in pppoeJouke Witteveen1-7/+7
This bug was discovered by Gala Dragos. Quotation is updated on the go.
2012-08-08Small code reviewJouke Witteveen1-13/+4
2012-08-08End initscripts compatibilityJouke Witteveen1-14/+1
The recent ovrhaul of rc.conf in initscripts is a good point to enforce using the proper configuration files for netcfg as well.
2012-08-08Set the IPv6 gateway after DADJouke Witteveen1-8/+10
Using gateways for which NDP used to discover routes during the latency of netcfg no longer works (https://bbs.archlinux.org/viewtopic.php?id=145923). Such routes can now be added manually.
2012-07-26Add a priority option to wpa config (FS#30737)Braden1-1/+6
Pass a priority parameter to wpa_supplicant (if specified). This is useful for net-auto-wireless.
2012-07-14Revise simple connection scriptsJouke Witteveen6-22/+10
- make specifying IP optional for tuntap profiles (FS#30638) - ethernet_{up,down} takes care of bring_interface {up,down} - debugging updates: don't hide errors, they are useful
2012-07-14Fix pid-based kills (FS#30664)Jouke Witteveen1-6/+8
The command argument to timeout_wait cannot reference positional parameters (they would become the positional parameters to timeout_wait). We kill wpa_actiond if it does not die with wpa_supplicant.
2012-07-10Remove duplicate codeJouke Witteveen1-4/+2
2012-07-08Fix match expression in ctrl_interface parsing (8021x)Jouke Witteveen1-3/+6
In bash built-in substring matching, '*' does not signify repetition of the previous character.
2012-07-08Use grep instead of fgrep (FS#30598)Jouke Witteveen3-6/+6
Direct invocation as fgrep is deprecated.
2012-07-05Remove unused status functionsJouke Witteveen7-51/+0
2012-07-05Rethink management of socket location for wpa_supplicantJouke Witteveen3-39/+52
This may be set in a custom supplicant configuration file. All this is needed to cater for that. The new name of the tracking variable is WPA_CTRL_DIR, conform the environment variable of wpa_cli -a.
2012-07-03Changes needed after b0373Jouke Witteveen2-2/+2
The reverted state wasn't entirely compatible with the current code. The WPA_CTRL_PATH handling throughout netcfg is ugly.
2012-07-03Cleanup src/networkJouke Witteveen2-22/+13
quirk() is not used anymore, inarray() doesn't belong in src/network.
2012-07-03Lower latency in timeout_waitHenrik Hallberg1-1/+2
2012-07-03Better grep usageJouke Witteveen3-6/+6
When possible, fgrep is preferred. This prevents interpreting variable search patterns as expressions. In setting the control paths, the search expression was updated to match what wpa_supplicant uses.
2012-07-03Revert "Don't rely on wpa_cli reconfigure to reload wpa.conf"Jouke Witteveen1-9/+6
This reverts commit 0d4c3ce797e688e146768bac07f6162d02634140. The reverted commit created a situation where wpa_supplicant is unnecessarily started and stopped in many cases, causing noticeable delay. If wpa_supplicant still fails to associate properly, wpa_reconfigure() should be modified in src/8021x.
2012-07-03Wait actively in {start, stop}_wpaHenrik Hallberg1-8/+6
Check .pid file regularly instead of waiting a second blindly. Saves up to a second of wall time per call.
2012-06-30Don't be crypticJouke Witteveen1-1/+2
The new way (cat) is common for netcfg and more readable. The old way (echo $(< )) is faster, but that is completely subordinate to readability, here.
2012-06-24Minor changesJouke Witteveen2-2/+1
$STATE_DIR/last_profile was unused and functionality one could want from it will soon be provided by netcfg-daemon.
2012-06-21Introduce polling timeout logicJouke Witteveen4-21/+23
This should fix FS#30361 along the way.
2012-06-21Minor improvementsJouke Witteveen3-13/+8
After this change, a profile started by a previous version of netcfg can potentially not be brought down anymore. This only concerns the updating process. Running `netcfg clean` should make everything OK again (potentially leaving your network down, but you can now bring up profiles again).
2012-06-18Increase base wifi scan waitJouke Witteveen1-3/+3
Sometimes no results responses have been collected within 2 seconds.
2012-06-14Less forkingJouke Witteveen1-1/+2
Suggestion by Dave Reisner.
2012-06-12Don't wait unnecessarily on bring_interface upJouke Witteveen1-4/+12
Good drivers indicate when they're up by the IFF_UP flag. This is the end of the (undocumented) UP_SLEEP variable and introduction of the UP_TIMEOUT (in seconds, default: 5) variable. This has 'noticeable speed improvement'-potential.
2012-06-12Wait for wifi scan results (FS#29946)Jouke Witteveen1-3/+9
We hardcode a timeout of 10 seconds. In case of a timeout, we use whatever results we have. It is unlikely that a timeout is hit. For fast scans, we are done half a second earlier than before.
2012-06-12New style to check command availabilityJouke Witteveen1-1/+1
When we don't really care which file implements the needed command (i.e. we don't call it by its full path), we use type to establish availability of the command. In wifi-menu we add a check for the dialog command and remove potential clearing of relevant error messages.
2012-05-29pppoe default to noauthThomas Bächler1-0/+1
pppd is a bit stupid with regard to configuration: It will always read /etc/ppp/options. This overrides the default 'auth' setting.
2012-05-17Wait for DAD when using IPv6 (FS#28887)Jouke Witteveen1-23/+35
In IPv6 you cannot bind to an address as long as it is not determined to be unique through Duplicate Address Detection. This can cause problems when routes in ROUTES6 reference a tentative source address or when something that starts after netcfg tries to. This patch does a few things: - Improve ROUTES(6) logic so that non-static connections can make use of them as intended according to the commit message of c8be1. - Make additional arguments possible for ADDR6 addresses and ROUTES6 routes, such as ADDR6=('1234:5678:9abc:def::1/64 nodad'). - Introduce a DAD_TIMEOUT variable that governs how long to wait for DAD to finish. - Move IPCFG processing to after IPv6 address set-up (it already was after IPv4 address set-up), so that custom commands can be sure to have working addresses. WARNING: This changes make it impossible to use ROUTES6 and set the address through IPCFG instead of ADDR6. This was bad, unsupported practice, but sometimes needed as ADDR6 did not allow config flags to be used. Resolving this issue should be no problem: you should be able to properly use ADDR6 now. If not, then be a real hacker and set the routes through IPCFG too. Many thanks to Steve Caligo for reporting this bug and helping out in finding a solution.
2012-05-16Code inspectionJouke Witteveen2-31/+30
Some changes after reading through a few files. Only two modifications impact functionality. - Not having dhclient is now fatal for IPv6 connections that use dhcp. - Allow authentication/associaton time-out of wpa to be set through TIMEOUT for wired connections too. dhclient no longer needs to be killed manually, so those lines are removed.
2012-05-07Be more precise in the makefileJouke Witteveen1-3/+3
Previously the packagers username would be visible in the tarball and all files laying around in docs/ would be included.
2012-04-30use 'ip route replace' instead of 'ip route add'Phillip Smith1-2/+2
iproute2 does not allow multiple default gateways in ipv6. this patch uses 'ip route replace' which will replace an existing route, or add a new one if none preexists.
2012-04-30Fix handling of profilenames with spaces (FS#28522)Jouke Witteveen1-1/+2
This was the result of commit b6964 which said to fix FS#17406 by reverting to the subshell-less for-loop that is once again removed in this commit. The real fix to FS#17406 was commit c3276 to the initscripts repository.
2012-04-16Add compatibilityJouke Witteveen2-22/+76
- Initscripts users are now offered familiar output. - Configuration through /etc/rc.conf was not gracefully deprecated.
2012-04-11Remove obsolete references to /etc/rc.confJouke Witteveen1-2/+1
Configuration is done through /etc/conf.d/netcfg. Compatibility with configuration through /etc/rc.conf is dropped.
2012-04-11Rewrite output hook to not depend on initscriptsJouke Witteveen4-49/+87
/etc/rc.d/functions is owned by initscripts on which netcfg does not explicitly depend. The revised layout is inspired by systemd.
2012-04-10Output fixesJouke Witteveen1-21/+16
Add spaces where necessary.
2012-04-10PPP disconnect fix (FS#20569)Jouke Witteveen1-2/+1
Commit 6b43b missed the point. As noted by Cláudio, Jesse Young, Maciej Sitarz and Harley Laue.
2012-04-09Minor changesJouke Witteveen2-6/+1
2012-04-03sysctl: use the correct key for interfaces with vlans (FS#26259)Jouke Witteveen1-7/+6
- Introduce $SYSCTL_INTERFACE. - Don't disable routing advertisements for stateful DHCPv6, as routes aren't sent by the DHCP server, but rely on routing advertisements to be picked up by the client. By: Steve Caligo, Fixes FS#26259
2012-04-03auto-wireless: improve dhcpcd callJouke Witteveen1-2/+2
- Use "-K" to prevent unnecessary remove/re-acquire a lease. - Respect /etc/network.d/interfaces/$interface and the dhcp options set there when connecting without a matching profile. Also use the same options used in $CONN_DIR/ethernet. Fixes by Thomas Bächler
2012-03-27Remove more deprecated codeJouke Witteveen2-9/+5
No need to keep support the "-old" syntax when it doesn't really do anything.
2012-03-27Uniformize SUBR_DIR quotingJouke Witteveen2-4/+4
It needs to be quoted when used as an argument. Putting the name in curly braces is unnecessary.
2012-03-21Revised bash completionJouke Witteveen1-6/+6
Bash completion does not deal properly with profile filenames that contain whitespace. There are some minor tweaks in this commit as well, but those should be harmless.
2012-03-04Remove cat-subshells (cosmetic)Jouke Witteveen2-5/+5
The use of cat in a subshell is distractive. This makes the code more beautiful.
2012-03-03Remove deprecated codeJouke Witteveen4-36/+4
Remove some code that should not be used anymore. A 2.7 release seems the right point for some minor interface breaking.
2012-03-01Code quality upgradeJouke Witteveen10-53/+53
This is what you get when Dave Reisner points you at some bash anti-patterns. Also in this commit: - updated documentation - bugfix revision of the IPv6 SLAAC address/route bug
2012-02-27Reconnect syntax for interfaces (FS#28196)Jouke Witteveen1-5/+21
It is now possible to reconnect based on the name of the interface.