aboutsummaryrefslogtreecommitdiff
path: root/networking/ifupdown.c
AgeCommit message (Collapse)Author
2006-09-17whitespace cleanupDenis Vlasenko
2006-08-03Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
2006-07-01More removal of "#if 0" content."Robert P. J. Day"
2006-06-20only enable count_bit functions when actually needed to fix warning reported ↵Mike Frysinger
by Bernhard Fischer
2006-05-29Size reductions, mostly switching things to use libbb functions.Rob Landley
2006-05-26Change llist_add_* to take the address of the list rather than returning the newRob Landley
head, and change all the callers.
2006-05-07Remove bb_strlen() in favor of -fno-builtin-strlen. Saves as many bytesRob Landley
as the old optimization did (actually does slightly better under gcc 4.0), and simplifies the code.
2006-04-14Remove code for protocols we don't properly support. (Most of this couldRob Landley
never be selected via menuconfig anyway.) If somebody wants one of these protocols, ask on the list for us to support it _properly_.
2006-04-03- move buffer allocation schemes to libbb.hBernhard Reutner-Fischer
- include the correct headers: applets need busybox.h while lib* need libbb.h
2006-03-22Fix from Glenn McGrath.Rob Landley
2006-03-06Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley
definitions. (That should only be on prototypes.)
2006-03-01Fixup to make warnings from the last patch go away.Rob Landley
2006-03-01Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)Rob Landley
from before "if(x) free(x)".
2006-02-28Cleanup from Glenn McGrath.Rob Landley
2006-02-26Patch from Glenn McGrath to remove code that opens a file but does nothingRob Landley
with it.
2006-01-25just whitespaceTim Riker
2005-12-14- several functions depend on IPv4 or IPv6 od IPX support.Bernhard Reutner-Fischer
removes warning about unused code for allbareconfig.
2005-10-28Rob Sullivan sent in some cleanups, which I beat on slightly.Rob Landley
2005-09-29change interface to bb_xasprintf() - more perfect for me."Vladimir N. Oleynik"
ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers reduce 100 bytes don't care in sum
2005-09-29- rename llist_add_to.c to llist.cBernhard Reutner-Fischer
- move llist_add_to_end() from ifupdown.c to libbb/llist.c
2005-09-22more remove lost exported"Vladimir N. Oleynik"
2005-04-27Do not attempt to free() the application's environment, which is wasEric Andersen
not dynamically allocated. Instead, use a private variable to store the environment array, which is used when we exec applications.
2005-04-16Patch from Bernhard Fischer to make a bunch of symbols staticEric Andersen
which were otherwise cluttering the global namespace.
2005-04-16Only define a local environ when not using the prototype from unistd.hEric Andersen
2004-09-14Patch from Felipe Kellermann, remove some unnecessary dups, i declared a few ↵Glenn L McGrath
extra const's also.
2004-07-30use SIGTERM to kill off udhcpd, not SIGKILLEric Andersen
2004-07-30As noted by Eric Spakman, calling static_down() and then callingEric Andersen
bootp_down() seems redundant, esp since bootp_down was a subset of static_down, so just use that...
2004-07-26add missing ;Eric Andersen
2004-07-26bother. unrevert my fix.Eric Andersen
2004-07-26Make certain that udhcp shuts down the interfaceEric Andersen
2004-07-26oopsEric Andersen
2004-07-26Make certain that udhcp shuts down the interfaceEric Andersen
2004-07-23Patch from Manousaridis Angelos to bring dhclient down more elegentlyGlenn L McGrath
2004-07-21Patch from Mike Snitzer to fix return codes.Glenn L McGrath
"I have a need to _really_ know if the interface was properly configured via ifup so I made busybox's ifupdown pass the return codes through rather than dropping them on the floor." "All the functions in ifupdown.c return 1 on success and 0 on failure (which happens to the opposite of standard practices but whatever). So it is important for all these functions to not blindly return 1." "The problem with blindly returning ret, even if it is != 1, is the callers expect a 0 or 1 and accumulate the return codes. So a function that makes 3 calls to execute will have a value of 3 accumulated. That value of 1 (success) was almost always returned even if 1 of the commands in the command sequence failed. The attached patch fixes the lack of checking to verify thar result == expected_reult."
2004-07-21Patch from Mike Snitzer, bring down dhclient using its correct pid, fixGlenn L McGrath
a grammatical error.
2004-07-20Prevent "`bootp_down' was declared implicitly `extern' and later `static'" ↵Eric Andersen
warning
2004-06-29Paul Fox writes:Eric Andersen
hi -- working with ifupdown, i've found a couple of buglets -- the wrong string is passed to an error message. paul
2004-04-25Update my email address, document some of my tasks in the AUTHORS fileGlenn L McGrath
2004-04-12Eric Spakman noticed that ifdown' will attempt to run 'ifconfig'Eric Andersen
even if built with CONFIG_FEATURE_IFUPDOWN_IP when shutting down a dhcp connection.
2004-03-15Remove trailing whitespace. Update copyright to include 2004.Eric Andersen
2003-12-19Manousaridis Angelos writes:Eric Andersen
Hello, I have been using busybox for some time now, for an ARM based platform. I was very pleased when I tried the 1.00preX series, with all the new utilities and daemons. I found out that the ifupdown in busybox does not behave exaclty like the debian version. Then the pre-up script fails, the interface is getting up. Also when the post-up script fails the return value is ignored. Actually everything is always run and the return value is always true. I looked at the original implementation from debian and fixed the busybox version to do the same. A patch is attached if anyone is interested.
2003-09-12As vodz just pointed out, I screwup up the call to bb_xasprintf!Eric Andersen
2003-09-12Invoke run-parts on /etc/network/if-*.d per the behavior ofEric Andersen
the upstream ifupdown code...
2003-09-02move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as oneGlenn L McGrath
constant. Vodz last_patch_107
2003-08-29label's dont work in v4 tunnels, patch by Eric SpakmanGlenn L McGrath
2003-08-06Eric Spakman writes:Eric Andersen
The attached patch adds "mtu" and "hwaddress" to the inet6 method and "mtu", "hwaddr" and "pointopoint" to the inet4 method (just like in the ifupdown part). Note: "hwaddress" can't be used with the busybox ip applet (this function isn't implemented in bb ip yet), but it can be of use with an external "full blown" ip package. The patch also removes "label" from the loopback configuration, labels (subinterfaces) aren't used with loopback interfaces. It further solves a problem in the bootp method, "ifconfig down %interface%" should be "ifconfig %interface% down" and it's now also possible to use ip with bootp. The patch is fully tested with both busybox ip and "stand-alone" ip and I didn't saw any problems.
2003-07-30Eric Spakman writes:Eric Andersen
The recent changes in ifupdown where all calls to 'ip link set' and 'ip addr set' are swapped give some problems with v4tunnels. For plain ipv4 and ipv6 interfaces it works correct, other methods not tried. The patch below change the behaviour back for v4tunnels only. Without the patch the following errors are shown: RTNETLINK answers: Network is down RTNETLINK answers: No route to host and the tunnel is not fully brought up With this patch all works as expected.
2003-07-29Match up interfacesEric Andersen
2003-07-29Bruno Randolf writes:Eric Andersen
this patch fixes run_parts when it's called by ifupdown. 1) argv has to be a NULL terminated char* array, not just a string. 2) run_parts now explicitly sets the environment. this environment is populated from the /etc/network/interfaces config file and is needed by the scripts in /etc/network/if-pre-up.d/. when run-parts is called from the command line the environment is taken from the current process. Vladimir Oleynik then wrote: You can simplify this if use: + bb_xasprintf(&buf[0], "/etc/network/if-%s.d", opt); + buf[1] = NULL; + + run_parts(&buf, 2, environ); + free(buf[0]); --w vodz
2003-07-03Patch from Lars Kellogg-Stedman:Eric Andersen
Erik, et al. The attached patch makes the following changes to networking/ifupdown.c: (1) It swaps all calls to 'ip link set' and 'ip addr set'. This solves two problems: (a) Calling 'ip link set <dev> up' before assigning an address generates an error message, and (b) Under User Mode Linux, running in with ethernet interfaces in daemon mode, the MAC address for an interface is selected based on the IP address assigned to that interface. If the interface is brought up before being assigned an IP address, it gets a null MAC. (2) It further cleans up run_mapping(). This patch is against ifupdown.c revision 1.25. -- Lars