aboutsummaryrefslogtreecommitdiff
path: root/networking/ifplugd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ifplugd: close signal raceDenys Vlasenko2018-04-291-0/+2
| | | | | | | function old new delta ifplugd_main 1109 1117 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: if SIOCSIFFLAGS fails with EADDRNOTAVAIL, don't dieStefan Agner2018-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using ifplugd on a RNDIS interface with monitor mode, using SIOCSIFFLAGS seems to fail with EADDRNOTAVAIL. Treat it the same as if iface disappeared again. This has been observed on a Tegra TK1 using Linux 4.14. There seem to be a race when the kernel is creating the device: ifplugd(usb0): started: BusyBox v1.24.1 (2018-03-27 09:47:48 CEST) ifplugd(usb0): interface doesn't exist, waiting ifplugd(usb0): interface appeared ifplugd(usb0): upping interface ifplugd(usb0): setting interface flags failed: Cannot assign requested address <exit> With this patch ifplugd is successful in upping the device the second time around: ifplugd(usb0): upping interface ifplugd(usb0): using SIOCETHTOOL detection mode ifplugd(usb0): interface appeared ifplugd(usb0): upping interface ifplugd(usb0): setting interface flags failed: Cannot assign requested address ifplugd(usb0): interface appeared ifplugd(usb0): upping interface ifplugd(usb0): using SIOCETHTOOL detection mode ifplugd(usb0): link is up ifplugd(usb0): executing '/etc/ifplugd/ifplugd.usb.action usb0 up' ifplugd up ifplugd(usb0): exit code: 0 function old new delta up_iface 120 127 +7 Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* zcip: fix slow environment leakDenys Vlasenko2017-07-221-4/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: deindent all help textsDenys Vlasenko2017-07-211-1/+1
| | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Update menuconfig items with approximate applet sizesDenys Vlasenko2017-07-181-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Convert all networking/* applets to "new style" applet definitionsDenys Vlasenko2016-11-231-0/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: if SIOCSIFFLAGS fails with ENODEV, don't dieDenys Vlasenko2016-08-161-2/+6
| | | | | | | | Some user managed to hit a race where iface is gone between SIOCGIFFLAGS and SIOCSIFFLAGS (!). If SIOCSIFFLAGS fails, treat it the same as failed SIOCGIFFLAGS Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LISTDenys Vlasenko2016-07-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many cases, this aqllows to drop use of opt_complementary. Approximately -400 bytes: function old new delta getopt32 1423 1502 +79 opt_string 17 18 +1 OPT_STR 24 25 +1 uniq_main 416 406 -10 timeout_main 279 269 -10 sulogin_main 270 260 -10 readprofile_main 1825 1815 -10 ps_main 543 533 -10 pidof_main 245 235 -10 pgrep_main 611 601 -10 od_main 2600 2590 -10 mkfs_minix_main 2684 2674 -10 mkfs_ext2_main 2603 2593 -10 microcom_main 712 702 -10 makemime_main 315 305 -10 ionice_main 282 272 -10 inetd_main 2074 2064 -10 ifplugd_main 1144 1134 -10 halt_main 353 343 -10 getopt_main 636 626 -10 fdisk_main 2854 2844 -10 env_main 206 196 -10 dmesg_main 319 309 -10 conspy_main 1214 1204 -10 awk_main 981 971 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/22 up/down: 81/-220) Total: -139 bytes text data bss dec hex filename 919373 906 14060 934339 e41c3 busybox_old 918969 906 14060 933935 e402f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: discovered why it needed net/ethernet.h: just for ETH_ALENDenys Vlasenko2015-10-071-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Aboriginal linux/musl build fixesDenys Vlasenko2015-10-051-1/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: code shrinkDenys Vlasenko2014-02-101-10/+12
| | | | | | | function old new delta ifplugd_main 1161 1144 -17 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: use a larger netlink bufferTito Ragusa2013-08-041-4/+10
| | | | | | | | function old new delta check_existence_through_netlink 310 321 +11 Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: make -k send SIGINT, not SIGQUITDenys Vlasenko2013-02-281-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* CONFIG_PID_FILE_PATH: new configuration option for pidfile pathsAnthony G. Basile2012-12-191-1/+1
| | | | | | | | | | | | | | | We set a default path for the directory where pidfiles are create when FEATURE_PIDFILE is selected. The default has no effect on applets which must specify a pidfile path on the command line to run, and it can be overridden by applets which optionally allow the user to specify the pidfile path. We also add pidfile write/remove support for klogd, ntpd and watchdog. For syslogd, we add a missing remove_pidfile() for better cleanup on daemon exit. Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ifplugd: tweak help textDenys Vlasenko2012-06-031-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: simplify Ethernet header includesDan Fandrich2011-06-101-1/+3
| | | | | Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move remaining help text from include/usage.src.hPere Orga2011-04-111-0/+26
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* eliminate aliasing warning in networking/route.cDenys Vlasenko2011-01-201-2/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: eliminate aliasing warningsDenys Vlasenko2011-01-201-10/+14
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: code shrinkMaksym Kryzhanovskyy2010-07-221-169/+164
| | | | | | | | | | | | | function old new delta ifplugd_main 1089 1161 +72 method_table - 40 +40 detect_link 221 207 -14 static.method 40 - -40 netlink_open 79 - -79 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 1/1 up/down: 112/-133) Total: -21 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: code shrinkMaksym Kryzhanovskyy2010-07-081-60/+35
| | | | | | | | | | | | | | function old new delta detect_link 122 221 +99 api_modes - 7 +7 maybe_up_new_iface 27 33 +6 ifplugd_main 1143 1089 -54 detect_link_auto 117 - -117 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 2/1 up/down: 112/-171) Total: -59 bytes Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: fix typo in prev commitDenys Vlasenko2010-05-111-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: replace potentially-leaking setenv with malloc/putenv/freeDenys Vlasenko2010-05-081-83/+20
| | | | | | | | text data bss dec hex filename 842657 453 6828 849938 cf812 busybox_old 842722 453 6828 850003 cf853 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: more robust interface name match checkDenys Vlasenko2010-04-021-2/+5
| | | | | | | function old new delta check_existence_through_netlink 278 308 +30 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: code shrink; expanded commentsMaxim Kryzhanovsky2010-03-301-15/+11
| | | | | Signed-off-by: Maxim Kryzhanovsky <xmaks@email.cz> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: code shrinkMaxim Kryzhanovsky2010-03-291-54/+34
| | | | | | | | | text data bss dec hex filename 840048 453 6828 847329 cede1 busybox_old 839915 453 6828 847196 ced5c busybox_unstripped Signed-off-by: Maxim Kryzhanovsky <xmaks@email.cz> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: merge some common stringsDenys Vlasenko2010-03-231-1/+1
| | | | | | | | text data bss dec hexfilename 838650 8009 0 846659 ceb43busybox_old 838519 8009 0 846528 ceac0busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: code shrink and better "died from signal" reporting from wait4pidDenys Vlasenko2010-03-181-3/+3
| | | | | | | | | | | | | | function old new delta parse 964 967 +3 udhcp_run_script 670 665 -5 singlemount 911 906 -5 mount_it_now 360 355 -5 inotifyd_main 521 516 -5 xspawn 21 - -21 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/4 up/down: 3/-41) Total: -38 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: restore auto-ifup unless -a; make iff method less iffy :DDenys Vlasenko2010-01-081-38/+34
| | | | | | | | | | | | | | | | | | function old new delta up_iface - 112 +112 network_ioctl 13 38 +25 detect_link_iff 58 71 +13 detect_link 143 152 +9 ifplugd_main 1107 1109 +2 detect_link_wlan 131 125 -6 detect_link_ethtool 71 65 -6 detect_link_priv 88 80 -8 detect_link_mii 88 80 -8 maybe_up_new_iface 144 27 -117 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/5 up/down: 161/-145) Total: 16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: simplify run_script()Denys Vlasenko2010-01-061-15/+9
| | | | | | | | function old new delta packed_usage 26505 26518 +13 run_script 158 112 -46 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: small optimizationDenys Vlasenko2009-11-071-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: fix compile errorDenys Vlasenko2009-10-231-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* randomconfig fixesDenys Vlasenko2009-08-081-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: fix warningsDenys Vlasenko2009-05-011-6/+9
|
* *: bb_error_msg's messages should not be capitalizedDenis Vlasenko2009-04-291-2/+2
|
* ifplugd: tiny shrinkDenis Vlasenko2009-04-261-2/+2
|
* ifplugd: add copyrightDenis Vlasenko2009-04-261-1/+16
|
* ifplugd: new applet by Maksym Kryzhanovskyy (xmaks AT email.cz)Denis Vlasenko2009-04-261-0/+810
+3k code and 0.5k in messages. Most of the bloat due to compat :(