Commit Graph

791 Commits

Author SHA1 Message Date
Mike Frysinger
bb12d6f728 fix comment documentation 2006-01-03 23:59:01 +00:00
"Vladimir N. Oleynik"
0bf67e849a remove buffer overflow by Erik and decodeString problem by Glenn, add error check of decodeString as Apache 2005-12-26 17:26:59 +00:00
"Vladimir N. Oleynik"
6b903a2d8a remove debug feature for production 2005-12-20 11:02:54 +00:00
Rob Landley
42eddbafe7 Add a fflush(stdout). 2005-12-15 08:04:17 +00:00
Rob Landley
5aabf4e415 Fix -g and -p options. Patch from Traceman. (I don't know who that is,
it's the darn bug generator again.)
2005-12-15 05:42:55 +00:00
Rob Landley
483027f166 Patch from dlively (whoever that is, see bug 591) to fix
"ip link set <dev> addr".
2005-12-15 05:29:48 +00:00
Bernhard Reutner-Fischer
d42ef28b98 - several functions depend on IPv4 or IPv6 od IPX support.
removes warning about unused code for allbareconfig.
2005-12-14 14:13:15 +00:00
Bernhard Reutner-Fischer
ec351c32e3 - do away with superfluous keyword. 2005-12-13 10:28:25 +00:00
Bernhard Reutner-Fischer
b7d5342003 - fix zcip for IMA compile mode.
rename usage() to zcip_usage, make struct arp_packet static. This applet is
  not ISO C89 compatible due to the use of C99-style comments ("c++ comments).
2005-12-12 10:21:35 +00:00
"Vladimir N. Oleynik"
2f0a5f947a restore compare_string_array new interface (make broken by landley) 2005-12-06 12:00:39 +00:00
Rob Landley
d1569c215c If we really _need_ an #ifdef like this, then we should be using the libbb
getopt infrastructure instead.
2005-12-02 17:57:23 +00:00
"Vladimir N. Oleynik"
27d42a08c8 remove warnings if compile with -W, use ENABLE_FEATURE vs CONFIG_FEATURE 2005-12-02 09:46:04 +00:00
Paul Fox
5a16a89427 eliminate mixed declaration, to support older compilers a little longer. 2005-11-28 16:29:45 +00:00
Rob Landley
c819ca98ee Can't store a pointer in an int on 64 bit platforms. 2005-11-22 17:09:14 +00:00
Rob Landley
b4c823211d Move interface.c to networking directory since it's only used by ifconfig. 2005-11-22 07:52:54 +00:00
Rob Landley
64a5f96780 telnetd -b (bind to specific address) support from Iuri Gomes Diniz. 2005-11-10 22:37:40 +00:00
"Vladimir N. Oleynik"
ecfd1f6a35 change osbolete sigpause() to sigsuspend() 2005-11-09 09:19:29 +00:00
Rob Landley
6f03722448 Patch from Tomasz Mateja: don't try to CWD to a _filename_, just send the full
path to the STOR command.
2005-11-08 00:52:31 +00:00
Rob Landley
7ad4b30ed4 Yann E. Morin pointed out that rpcsvc/nfs_prot.h isn't needed with any
reasonably recent glibc, and breaks with uClibc.  So yank it.
2005-11-06 23:37:47 +00:00
Rob Landley
1b751c894b Rob Sullivan sent in some cleanups, which I beat on slightly. 2005-10-28 09:24:33 +00:00
Bernhard Reutner-Fischer
ab1878245c * uniq.c: remove unneeded include and use short boilerplate.
* coreutils.h: remove prototype of non-existing xgetoptfile_sort_uniq
	and add boilerplate.
	* networking/{ipaddr,ip,iplink,iproute,iptunnel}.c: touch includes
	and use short boilerplate.
	* libiproute/iproute.c: rename round to avoid clashes with older
	SuSE gcc and use short boilerplate.
2005-10-26 10:47:26 +00:00
Bernhard Reutner-Fischer
38d6615ed2 - fix bug to avoid aliasing busybox' main to zcip_main in IMA mode. 2005-10-21 10:43:11 +00:00
"Vladimir N. Oleynik"
86ac072b44 more const, use bb_getopt_ulflags, insert XXX for show place of problems 2005-10-17 10:47:19 +00:00
"Vladimir N. Oleynik"
6f347ef9dc common BUFSIZ BSS buffer, small reduce code, data and bss 2005-10-15 10:23:55 +00:00
"Vladimir N. Oleynik"
f704b27b5b - new bb_opt_complementally syntax, use [-:?] only - 'free' chars
- new bb_getopt_ulflags features: check max and min args, convert first argv to options special for ar and tar applets
- use bb_default_error_retval for env applet
2005-10-14 09:56:52 +00:00
"Vladimir N. Oleynik"
6c35c7c976 usage bb_dev_null 2005-10-12 15:34:25 +00:00
Bernhard Reutner-Fischer
1d62d3b7b9 - make libiproute compile.. 2005-10-08 20:47:15 +00:00
Bernhard Reutner-Fischer
0b42a6a8cf - remove superfluous C statements ";;" in decompress_unzip.c, dpkg_deb.c ifconfig.c
- gzip.c: see if O_NOFOLLOW is defined before using it, else take alternate path
closes bug #221 (partially; The rest will follow later).
2005-10-07 11:34:50 +00:00
"Vladimir N. Oleynik"
c06e80e1e7 more lost changes BSD signals -> SysV signals. Noticed by Bernhard 2005-10-05 14:14:55 +00:00
"Vladimir N. Oleynik"
f382c0236e BSD signals -> SysV signals, int->socklet_t. Noticed by Bernhard 2005-10-05 14:01:13 +00:00
Mike Frysinger
23fedb3ad4 dont typecast lvalue since gcc hates that 2005-10-05 00:50:03 +00:00
"Vladimir N. Oleynik"
1a2f4d9af7 sync inetd with slackware-10.2 inetd (OpenBSD-1.79), have destroy bug 455 2005-10-03 08:08:58 +00:00
"Vladimir N. Oleynik"
39a841cecf change interface to bb_xasprintf() - more perfect for me.
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 16:18:57 +00:00
Bernhard Reutner-Fischer
bee9eb1a9d - rename llist_add_to.c to llist.c
- move llist_add_to_end() from ifupdown.c to libbb/llist.c
2005-09-29 12:55:10 +00:00
"Vladimir N. Oleynik"
7090800870 revert wait zombie, it have as linux-specific signal(SIG_CHLD,SIG_IGN) already, do not confuse me\! 2005-09-26 13:55:43 +00:00
Mike Frysinger
3978abd05b Cristian Ionescu-Idbohrn writes to fix a warning: networking/ifconfig.c uses an uchar ptr to work with a char ptr so change the uchar to char 2005-09-24 23:52:09 +00:00
Mike Frysinger
b7f88e01a4 touchup argc/argv handling to shrink a bit and fix a segfault when given wrong number of parameters as noted and fixed by Cristian Ionescu-Idbohrn 2005-09-24 23:48:18 +00:00
Mike Frysinger
62f18e1f20 use the shorter license header 2005-09-24 07:16:29 +00:00
Mike Frysinger
0d4ee68be5 use brief license line 2005-09-24 06:01:57 +00:00
Bernhard Reutner-Fischer
30b17863bd - ifupdown needs run-parts. Thanks Derosnec for pointing this out. 2005-09-23 19:37:13 +00:00
"Vladimir N. Oleynik"
b628409b1e more make safe the exported namespace for udhcp. Move to bb-specific file for reduce change into udhcp-CVS 2005-09-23 11:25:29 +00:00
"Vladimir N. Oleynik"
53ad366fe7 remove 1 exported 2005-09-23 10:44:02 +00:00
Paul Fox
b6f71645f4 move a couple of functions from common code (options.c) to udhcpd private
code (files.c) to make udhcpc a little smaller.
2005-09-22 19:03:24 +00:00
Paul Fox
28de951b02 add support for setting the dhcp vendor class option (option 60).
udhcpc now has a -V (--vendorclass), which will replace the default
"udhcpRELEASE" string in this option.
2005-09-22 18:59:13 +00:00
"Vladimir N. Oleynik"
2f9c30a2d5 safe exported namespace for udhcp. Not full, bore :-( 2005-09-22 15:07:33 +00:00
"Vladimir N. Oleynik"
e4baaa2d27 more remove lost exported 2005-09-22 12:59:26 +00:00
"Vladimir N. Oleynik"
007a011647 network "default" --> bb_INET_default. Reduce 2 exported from find applet 2005-09-22 11:11:11 +00:00
Bernhard Reutner-Fischer
d5bd137a24 - rename libbb's password helpers as suggested in libbb.h
my_getpwnam -> bb_xgetpwnam  /* dies on error */
  my_getgrnam -> bb_xgetgrnam  /* dies on error */
  my_getgrgid -> bb_getgrgid
  my_getpwuid -> bb_getpwuid
  my_getug    -> bb_getug
2005-09-20 21:06:17 +00:00
"Vladimir N. Oleynik"
54deebf4e4 destroy bug #421 2005-09-19 10:46:44 +00:00
Rob Landley
6a65d2f8cc Amir Shalem observed that telnetd doesn't really require login, so forcing
it is wrong.
2005-09-15 18:22:43 +00:00
Mike Frysinger
887a1ad57f BsAtHome writes in Bug 433:
Ping packets sent by busybox have wrong endian on f.x. mips32 (openwrt). Attatched is a patch that 
uses htons() and ntohs() to be platform independent.
2005-09-15 01:32:48 +00:00
Rob Landley
230b411de8 Fix the warning by rewriting the function to be smaller and simpler.
I'd appreciate somebody on a __BIG_ENDIAN platform testing this out; I haven't
got the hardware...
2005-09-08 03:22:09 +00:00
"Vladimir N. Oleynik"
45a8ed89c6 - sync traceroute with Slackware-10.1
(support -FIl -g gw -i if -z pt now).
- libbb/getopt_ulflags.c support bb_opt_complementally="x-x" as trigger now
2005-09-06 16:08:33 +00:00
"Vladimir N. Oleynik"
27421a1878 1) bb_opt_complementaly -> bb_opt_complementally
2) better support long options
3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
2005-09-05 14:46:07 +00:00
Rob Landley
344ea471ef Tracking system but #4: php needs the environment variable SCRIPT_FILENAME. 2005-09-01 09:38:32 +00:00
Rob Landley
37adefc670 Off by one error in max_leases sanity check. Bug 349, apparently. 2005-09-01 02:43:39 +00:00
Rob Landley
6417564eeb Two FEATURE_CLEAN_UP patches from Shaun Jackman, closing filehandles. 2005-08-22 15:57:50 +00:00
Paul Fox
b831753676 commiting:
0000073: Add option to inetd applet to run in foreground
this option was already there for uclinux -- this just exposes
it in the normal case as well.
2005-08-01 19:39:47 +00:00
Paul Fox
a39bba33c8 allow suppression of default client-id. fixes bug 000037. allows
busybox to match kernel and u-boot behavior with respect to client-id.
2005-08-01 14:31:13 +00:00
Mike Frysinger
d84a35f649 patch by apgo in Bug 345 to not use ether_hostton() with uClibc 2005-07-31 22:49:12 +00:00
Mike Frysinger
66c37d1390 typecast to int 2005-07-31 22:22:20 +00:00
Mike Frysinger
2e3054f413 use socklen_t instead of size_t with socket related functions 2005-07-31 22:20:02 +00:00
Rob Landley
ef8f423e90 Erik pointed out that in the last try at the #ifdef cleanup
infrastructure, the compiler isn't smart enough to replace const static 
int with the constant, and allocates space for each set of them, 
bloating the executable something fierce.  Oops.

So now, we #define ENABLE_XXX to 0 or 1 for each CONFIG_XXX (which
is still there so the 1000+ #ifdef/#ifndef tests don't have to be
replaced wholesale).  Changed the test instance in networking/ifconfig.c 
to use this.
2005-07-28 19:36:33 +00:00
Rob Landley
193c8c7383 #ifdef reduction infrastructure, based on an argument between Shaun Jackman,
Rob Landley, and others.

Currently CONFIG options are defined or undefined, so we chop out code with
#ifdefs, ala:
#ifdef CONFIG_THING
  stuff();
#endif

This creates a new header file, bb_config.h, which sets the CONFIG entry to 1
or 0, and lets us do:

  if(CONFIG_THING) stuff();

And let the compiler do dead code elimination to get rid of it.  (Note: #ifdef
will still work because for the 1 case it's a static const int, not a #define.)
2005-07-27 06:55:36 +00:00
Mike Frysinger
4d00896d05 use toplevel ARFLAGS and update default ARFLAGS to be quiet 2005-07-27 01:09:24 +00:00
Mike Frysinger
03e827a422 2005-03-19 Shaun Jackman <sjackman@gmail.com>
* networking/ping.c (ping): Change the type of fromlen to socklen_t.
2005-07-26 23:00:59 +00:00
Paul Fox
7b86134032 remove duplicate check against chaddr. 2005-07-21 20:23:56 +00:00
Paul Fox
f2ddc05ee7 applying fix for:
0000026: poor man's "scriptable" telnet
2005-07-20 19:55:19 +00:00
Paul Fox
1d4c88c8a5 applying fix for:
0000271: [PATCH] tftp -g fails if a TFTP_ACK is lost
2005-07-20 19:49:15 +00:00
Paul Fox
982d35ffa2 applying fix for:
0000263: nc cannot use -e when initiating a tcp connection
    	to something else
2005-07-20 19:40:30 +00:00
Paul Fox
01f67987e0 applying fix for:
0000260: udhcpc doesn't validate client hardware address
2005-07-20 19:13:21 +00:00
Paul Fox
5dc0ceeb9e applying fix for:
0000203: 'ip route flush cache' not implemented
2005-07-20 19:01:05 +00:00
Paul Fox
77ee52333c applying fix for:
0000185: httpd infinite loop when piping to CGI script
2005-07-20 18:42:52 +00:00
Paul Fox
28069404a4 much more concise fix for bug #45. just align the packet... 2005-07-20 11:55:08 +00:00
Paul Fox
146e83a60e applying fix from:
0000108: busyboxy/networking/ftpgetput.c not conforming to
                    RFC 959.  ftpget and ftpput send <LF> as EOL.
2005-07-19 21:26:57 +00:00
Paul Fox
deac371690 applying fix from:
0000088: inetd chargen stream does not generate the
	    characters as recommended in RFC 864
	    Chragen service is generating garbage characters.
2005-07-19 21:19:20 +00:00
Paul Fox
b270315b21 applying fix for:
0000045: traceroute causes an alignment trap due to unaligned buffer on arm
2005-07-19 20:37:15 +00:00
Paul Fox
7b71d740b9 fix for "0000027: patch: nc will spin if stdin closed" 2005-07-18 22:23:16 +00:00
Ned Ludd
778ee6da60 - remove extra/unneeded function call. testing svn 2005-06-24 03:47:57 +00:00
Eric Andersen
3efa51d943 characters encoded as html should have a trailing semicolon
to be interpreted properly
2005-06-23 05:51:48 +00:00
Rob Landley
f3133c4149 Thus spake Brenda J. Butler:
We were seeing some timeouts when getting files with the busybox tftp
client.

With tcpdump, we saw that the tftp client was receiving blocks and
ack'ing them, but the server was failing to receive the occasional
ack.

When that happened, the server would send the last block over again,
but the tftp client was expecting the next block.

This patch allows the client to recover from this situation
(it sends an ack for the repeat block but does not write it
to the local file).

I hope it meets your approval, please don't hesitate to send
me comments for improvement.

The patch is against "head" in svn, I tested it on an older version
of busybox in our environment.  It applied cleanly to the older
version.

Credit for this goes to my co-worker John McCarthy for finding
it and me for fixing it (assuming it works for everyone else too).

cheerio,
bjb
2005-06-07 02:40:39 +00:00
Rob Landley
0b1ff5a606 Tobias Krawutschke found a bug where the DHCP client would accept packets
with the wrong ARP address, meaning we could easily get somebody else's IP.
That is a bad thing, and this is the minimal two-line fix.
2005-05-26 05:25:12 +00:00
Mike Frysinger
b662f0d58b import ether-wake applet by haveaniceday Bug 252 2005-05-11 03:59:53 +00:00
Rob Landley
00e76cb6b9 Patch from Jason Schoon to add IPV6 support to telnetd. Reworked by Rob
Landley to remove an #ifdef and move another one out of the flow of code.
2005-05-10 23:53:33 +00:00
Mike Frysinger
9c85ecdef4 use shared busybox error messages to save a few bytes 2005-05-07 06:45:29 +00:00
Mike Frysinger
7dc7f402a7 make the exec (-e) an optional feature of netcat 2005-05-06 05:00:34 +00:00
Mike Frysinger
60a5c38a4b In bug 247, haveaniceday writes:
The option "-w secs" adds a timeout for writing.
2005-05-06 04:45:38 +00:00
Rob Landley
918f2ab3d7 Revert the uptime() removal. Let the list sort it out... 2005-05-04 02:15:23 +00:00
Rob Landley
8b80c71d70 Patch from Shaun Jackman:
Replace uptime with time(NULL). time is more portable than uptime and
eliminates the need to define uptime, reducing code size slightly.
2005-05-04 00:38:15 +00:00
Rob Landley
0d38301d85 From: Shaun Jackman <sjackman@gmail.com>
To: busybox@mail.codepoet.org
  
Wrap sockaddr_in6 in a ifdef CONFIG_FEATURE_IPV6.
Include sys/types.h instead of asm/types.h.
Include netinet/if_ether.h instead of linux/if_ether.h
The ioctl request argument is an int, not an unsigned short.
2005-05-03 22:30:08 +00:00
Rob Landley
e3752e56a4 Revert Tito's patch to zcip. My bad, David Brownell had objected and I missed
it...
2005-05-03 03:28:55 +00:00
Rob Landley
8445a9ff99 On Tuesday 19 April 2005 21:10, Tito wrote and today added:
> Hi,
> this is a first attempt of size optimization for zcip taking into account all
> the hints given so far on the list.
> I've applied just the more obvious busyboxifications so maybe it could be
> optimized more.
BTW: I've ripped out  a lot of debug code and changed c++ // comments to /* */
as both were rather confusing for a newbie like me. ;-) 
Sorry to the author for that.
I know that this makes mantaining the code easier, but I'm simple minded....
2005-05-01 00:22:03 +00:00
Rob Landley
ad8071f582 David Brownell submitted a new applet, zcip, based on RFC 3927. This is
version 0418b.  It compiled.
2005-04-30 03:49:37 +00:00
Eric Andersen
70a5a1abde Do not attempt to free() the application's environment, which is was
not dynamically allocated.  Instead, use a private variable to store
the environment array, which is used when we exec applications.
2005-04-27 11:44:11 +00:00
Mike Frysinger
7202e00b4c remove unused variable and declare writepid inline 2005-04-23 01:42:29 +00:00
Mike Frysinger
91d8f0e892 touchups as suggested by Vladimir N. Oleynik 2005-04-18 18:52:15 +00:00
Mike Frysinger
fa69f110d9 import fakeidentd module started by Thomas Lundquist 2005-04-17 07:24:19 +00:00
Eric Andersen
14f5c8d764 Patch from Bernhard Fischer to make a bunch of symbols static
which were otherwise cluttering the global namespace.
2005-04-16 19:39:00 +00:00
Eric Andersen
63e5e7bf0e Fix broken macro 2005-04-16 08:04:31 +00:00
Eric Andersen
42e3b00ae5 Only define a local environ when not using the prototype from unistd.h 2005-04-16 08:02:15 +00:00
Mike Frysinger
4e5936ef95 In Bug 208, bernhardf writes:
On machines with only ANSI compliant compilers, not explitily delcaring
an empty parameter list 'void' causes failure.
2005-04-16 04:30:38 +00:00
Mike Frysinger
3cc01a80a3 In Bug 209, bernhardf writes:
struct named {
    named_field: init,
};
appear to be depraced by now; rather use C{99} format as in
struct named {
    .named_field = init,
};
2005-04-16 04:17:39 +00:00
Mike Frysinger
d824853de3 merge from udhcp module 2004-12-06 14:59:45 +00:00
Eric Andersen
9789bf1019 return failure when nslookup fails 2004-10-13 07:25:01 +00:00
Eric Andersen
abf58d6ba5 Wade Berrier writes:
Hello,

Here's a patch for a first attempt at static leases for udhcpd.
Included in the tarball are 2 files (static_leases.c, static_leases.h)
and a patch against the latest cvs.

In the config file you can configure static leases with the following
format:

static_lease 00:60:08:11:CE:4E 192.168.0.54
static_lease 00:60:08:11:CE:3E 192.168.0.44

Comments/suggestions/improvements are welcome.


Wade
2004-10-08 08:49:26 +00:00
Eric Andersen
751750e3ee Patch from Denis Vlasenko to fix a problem where
wget http://1.2.3.4/abc/ loses last '/'
2004-10-08 08:27:40 +00:00
Eric Andersen
07f2fea62c last_patch139.gz from Vladimir N. Oleynik:
>I also don't mean to disagree about leaving 30x status codes until after
>1.0.  In fact, although redirecting http://host/dir to http://host/dir/
>with a 301 is common practice (e.g. Apache, IIS), AFAIK it isn't
>actually required (or mentioned) by the HTTP specs.

Ok.
Attached patch have 302 and 408 implemented features.


--w
vodz
2004-10-08 08:03:29 +00:00
Eric Andersen
7daa076d3e egor duda writes:
Hi!

I've created a patch to busybox' build system to allow building it in
separate tree in a manner similar to kbuild from kernel version 2.6.

That is, one runs command like
'make O=/build/some/where/for/specific/target/and/options'
and everything is built in this exact directory, provided that it exists.

I understand that applyingc such invasive changes during 'release
candidates' stage of development is at best unwise. So, i'm currently
asking for comments about this patch, starting from whether such thing
is needed at all to whether it coded properly.

'make check' should work now, and one make creates Makefile in build
directory, so one can run 'make' in build directory after that.

One possible caveat is that if we build in some directory other than
source one, the source directory should be 'distclean'ed first.

egor
2004-10-08 07:46:08 +00:00
Eric Andersen
31ec93e580 Add some notes on how to make telnetd actually work 2004-09-23 20:08:46 +00:00
Glenn L McGrath
d4004ee6a9 Patch from Felipe Kellermann, remove some unnecessary dups, i declared a few extra const's also. 2004-09-14 17:24:59 +00:00
Eric Andersen
b225e2a76b Fixup some warnings 2004-08-28 00:43:07 +00:00
Eric Andersen
97a1de10e9 Vladimir N. Oleynik writes:
Ming-Ching,

>>No. Here there are no mistakes.
>>You using POST metod.
>>For get data you should read from stdin CONTENT_LENGTH bytes.

>Hower as I posted a little while ago, there is indeed a bug
>in POST method if the CONTENT_LENGTH is bigger
>than sizeof(wbuf[128]). So if your CGI script is expecting to
>read the full CONTENT_LENGTH, it might block forever,
>because it will only transfer sizeof(wbuf) to the CGI.

Ok, Ok. I should find time to understand with a problem.
Try attached patch.


--w
vodz
2004-08-26 22:22:50 +00:00
Glenn L McGrath
4014ab1c60 Set default command to list rather than get, its default behaviour now
coincides with upstream. Patch from debian diff.
2004-08-11 08:10:58 +00:00
Eric Andersen
15b588559b use SIGTERM to kill off udhcpd, not SIGKILL 2004-07-30 14:45:08 +00:00
Eric Andersen
373bc1eaee As noted by Eric Spakman, calling static_down() and then calling
bootp_down() seems redundant, esp since bootp_down was a subset
of static_down, so just use that...
2004-07-30 14:31:01 +00:00
Eric Andersen
7f8bcbefc7 add missing ; 2004-07-26 12:22:33 +00:00
Eric Andersen
b2a300590d bother. unrevert my fix. 2004-07-26 12:11:32 +00:00
Eric Andersen
ac594257c3 Make certain that udhcp shuts down the interface 2004-07-26 12:05:44 +00:00
Eric Andersen
29128cd412 oops 2004-07-26 11:46:50 +00:00
Eric Andersen
06e62fd5f0 Make certain that udhcp shuts down the interface 2004-07-26 11:45:25 +00:00
Glenn L McGrath
4d405bbc05 Patch from Manousaridis Angelos to bring dhclient down more elegently 2004-07-23 01:10:22 +00:00
Glenn L McGrath
0177ce1256 Patch from Mike Snitzer to fix return codes.
"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-21 23:56:31 +00:00
Glenn L McGrath
469a1ead53 Patch from Mike Snitzer, bring down dhclient using its correct pid, fix
a grammatical error.
2004-07-21 12:21:39 +00:00
Eric Andersen
5e136f269b Prevent "bootp_down' was declared implicitly extern' and later `static'" warning 2004-07-20 06:35:54 +00:00
Eric Andersen
fe9b9cdfa5 Paul Fox writes:
hi --

working with ifupdown, i've found a couple of buglets --
the wrong string is passed to an error message.

paul
2004-06-29 00:48:30 +00:00
Eric Andersen
4872ed9737 Robin Farine writes:
Hi,

Package: BusyBox
Version: 1.0.0-pre10

When an incomplete read or write from/to a local file occurs (i.e.
not an EOF condition), the tftp client prematurely exits. This
problem can be reproduced by slowly piping data to the tftp client
like this:

  (for v in 1 2 3; do echo $v; sleep 1; done) | \
  tftp -p -l - -r output.txt <host>

The output file on the TFTP server will contain "1".

The attached patch provides a possible solution to this problem.

I can reproduce this on ARM sa1110 and ARM xscale boards, both
running Linux-2.6.4 & glibc-2.3.2. Thanks for the wonderful
program!

Robin
2004-06-22 10:18:30 +00:00
Eric Andersen
36adca81f5 Patch from Bastian Blank:
On Sat, Jun 19, 2004 at 10:57:37PM +0200, Bastian Blank wrote:
> The following patch changes klogd to use openlog/syslog themself
> instead of calling syslog_msg which always calls the triple
> openlog/syslog/closelog.

Updated patch: get rid of syslog_msg entirely. Request from Erik Andersen.

Bastian
2004-06-22 10:07:17 +00:00
Eric Andersen
78a5ddeff0 Robin Farine writes:
Package: BusyBox
Version: 1.0.0-pre10

Passing the -q <integer> option to inetd causes it to dereference an
invalid pointer (optarg). The attached patch provides a fix to this
problem.

Robin
2004-06-22 08:40:54 +00:00
Russ Dill
5c9323f4e6 use busybox sysinfo struct 2004-05-19 09:18:04 +00:00
Eric Andersen
28885c3f20 Fix a compile problem 2004-05-19 08:54:28 +00:00
Russ Dill
309c7b71e6 fix timewarp in client (server fix later) 2004-05-19 08:29:05 +00:00
Russ Dill
91e006c1ad remove uneccessary check (already done in pidfile.c) 2004-05-19 07:46:23 +00:00
Russ Dill
57f49d3185 fix memory leak caused by switch to vfork 2004-05-19 07:45:47 +00:00
Eric Andersen
6c8161d69f Steve Grubb writes:
Hello,

Last November a bug was found in iproute. CAN-2003-0856 has more information.
Basically, netlink packets can come from any user. If a program performs action
based on netlink packets, they must be examined to make sure they came from the
place they are expected (the kernel).

Attached is a patch against pre8. Please apply this before releasing 1.00 final.
All users of busy box may be vulnerable to local attacks without it.

Best Regards,
Steve Grubb
2004-05-05 07:05:32 +00:00
Glenn L McGrath
5ec58285c3 Fix size command, safe_strtoul gives and error if the \r is left in, the
RFC spec says the \r should be there.
This fix is the same as a recent wget fix
2004-05-04 10:43:34 +00:00
Eric Andersen
f71ad6c9e4 Thomas Koeller writes:
Hi,

    the following output is from BusyBox 1.0.0-pre10:

    ~ # ip link help
    ip: Command "help" is unknown, try "ip link help".

    tk

This patch fixes it by removing the advertisements for
the "ip blah help" stuff that is not implemented.
2004-04-26 19:32:49 +00:00
Glenn L McGrath
c6992feee3 Update my email address, document some of my tasks in the AUTHORS file 2004-04-25 05:11:19 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.

Erik - please apply.

Authors - please check that I didn't corrupt any meaning.

Package importers - see if any of these changes should be
passed to the upstream authors.

I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.

What is "pretect redefined for test" in cmdedit.c?

Good luck on the 1.00 release!

      - Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
a4375047d3 slightly clean the whacked out formatting 2004-04-13 19:25:57 +00:00
Eric Andersen
238e354b58 Eric Spakman noticed that ifdown' will attempt to run 'ifconfig'
even if built with CONFIG_FEATURE_IFUPDOWN_IP when shutting down
a dhcp connection.
2004-04-12 20:57:17 +00:00
Glenn L McGrath
19efb3dc59 Fix compile error if CONFIG_FEATURE_IP_ADDR isnt enabled 2004-04-12 02:35:44 +00:00
Glenn L McGrath
36c7478992 Fix up conditional compile of files needed by ip applets 2004-04-12 02:22:39 +00:00
Glenn L McGrath
32da885a91 Fix ftp resume
Terminate returned message at <CRLF> so strtoul returns without error
2004-04-08 10:27:11 +00:00
Eric Andersen
7b5bb51f6a Fix indenting 2004-04-06 16:56:00 +00:00
Eric Andersen
c11a6a887b Patch from Thomas Winkler:
ifconfig did not look up hostnames, so
	ifconfig lo localhost
would not work, you have to do
	ifconfig lo 127.0.0.1
2004-03-31 11:30:08 +00:00
Eric Andersen
70060d25d2 s/fileno\(stdin\)/STDIN_FILENO/g
s/fileno\(stdout\)/STDOUT_FILENO/g
2004-03-27 10:02:48 +00:00
Manuel Novoa III
539fa95e0d Oops.. got a bit to aggressive with size optimization and global replace. :-( 2004-03-19 23:27:08 +00:00
Eric Andersen
ca65ca7d45 Oops. Using the wrong variable was a rather stupid
thing for me to do.
2004-03-15 08:46:37 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Manuel Novoa III
7d0c51919c In spite of the feature freeze, check in a complete rework of route which
fixes some bugs, adds some error checking, and removes _lots_ of bloat.
Text size on i386...
              old     new
   ipv6      5425    3523
   no ipv6   3143    2193
2004-03-10 07:42:38 +00:00
Eric Andersen
2479445562 Fix/eliminate use of atol 2004-03-06 22:11:45 +00:00
Glenn L McGrath
3f79300e37 Patch by Andrew Victor,
In arpping.h, fix structure alignment of "struct arpMsg".
GCC can insert padding in the structure which causes udhcpd to send an
invalid ARP packet on the network.  It will then not receive a valid
reply, which can cause it to assign an IP address that's already in use
on the network.
(With kernels before 2.4.20, the "struct ethhdr" in linux/if_ether.h
wasn't marked as packed.  This is also an issue if your toolchain was
built with a pre-2.4.20 kernel).
2004-03-05 14:25:49 +00:00
Glenn L McGrath
0226596dcb Fix a typo, patch by Andrew Victor 2004-03-05 14:23:16 +00:00
Glenn L McGrath
fbe984e1c9 Fix debugging output, patch by Hideki IWAMOTO 2004-03-05 13:04:39 +00:00
Glenn L McGrath
3d752f7ab2 Patch from Steven Scholz to fix compiler warnings 2004-03-05 09:38:16 +00:00
Glenn L McGrath
d5d5e54290 Quick fix for tftp truncation bug 2004-02-26 07:47:20 +00:00
Eric Andersen
d8746cdc40 Joe.C, joe at numa dot com dot tw writes:
Hi,

When downloading files over slow network (e.g. wireless/
internet) using IE, sometimes it will stop downloading and
show error message 'connection closed' when the download
is almost complete. This is because IE can't handle server
close connection properly.

Apache http_main.c fix this problem by close the connection
after client close the connection. This patch do exactly the
same thing. Please consider include this patch.

Joe.C
2004-02-24 07:28:38 +00:00
Eric Andersen
539ffc9129 Fernando Silveira writes:
Hi,

  Well, I made this patch a long time ago (08/2002) because it was a
  need of a project, but had no time to send it to you. It adds support
  to `autologin' option of the telnet protocol. It has been used since
  made with busybox 0.60.3 at production and I had no problems with it.
  I have ported it to the HEAD revision of the CVS server (20040211) and
  I hope you enjoy and apply it to the official sources. :)

Thanks a lot!
2004-02-22 12:25:47 +00:00
Glenn L McGrath
df7d84cf25 Patch from Vodz, cleanup memory usage, send strdup error messages to
syslog.
2004-02-22 11:25:13 +00:00
Glenn L McGrath
90ed9a0eb6 Patch from James Zhu, telnetd window resizing support. 2004-02-22 09:45:57 +00:00
Glenn L McGrath
d33278dea5 Patch from Hideki IWAMOTO, output debugging messages to stderr 2004-02-22 07:20:25 +00:00
Glenn L McGrath
34e1469f24 remove duplicate header declarations 2004-02-22 04:58:36 +00:00
Glenn L McGrath
c699778fbb Ptch by Hideki IWAMOTO, fix a bug preventing tftp from getting or
putting more than 0xffff blocks.
2004-02-22 03:33:53 +00:00
Glenn L McGrath
f1c4b11b24 No need to check proxy env variable twice, ignore proxy env variable if
its set to 0
2004-02-22 00:27:34 +00:00
Glenn L McGrath
03a0643fbc Dont use same variable and struct name 2004-02-18 13:19:58 +00:00
Glenn L McGrath
82d42dbb57 Formatting 2004-02-18 13:12:53 +00:00
Glenn L McGrath
aac2a19e50 remove debugging 2004-02-18 12:58:00 +00:00
Eric Andersen
37aac6489e Remove the unused CONFIG_FEATURE_HTTPD_SET_CGI_VARS_TO_ENV option. 2004-02-17 20:08:11 +00:00
Eric Andersen
60bb3f31af Mark Lord writes:
The config file processing for inetd in busybox-1.00-pre7 and newer
is broken -- the saved command argv[] values overwrite each other.

Patch to fix it is attached.

Cheers
--
Mark Lord
Real-Time Remedies Inc.
2004-02-17 20:04:34 +00:00
Eric Andersen
ef43749e83 Joe.C writes:
Hi,

   When httpd connection is closed, bosybox httpd will
not stop reading from CGI program. This patch fix this
problem. It check the return value of bb_full_write and
stop reading from CGI if the connection is closed.
Please apply this patch.

Joe.C
2004-02-04 11:10:28 +00:00
Glenn L McGrath
24cb17f9be Fix http proxy use, bytes were swapped 2004-01-31 08:08:57 +00:00
Eric Andersen
ad95373efc Use standard C99 types 2004-01-30 23:45:53 +00:00
Eric Andersen
1a834be1ce Use proper C99 types 2004-01-30 22:59:50 +00:00
Eric Andersen
39cdf4e2ab Use proper C99 types 2004-01-30 22:40:05 +00:00
Eric Andersen
f2ec37902a Pascal Brisset writes:
uuencode fails to encode binary data because it right-shifts
bytes as signed chars and keeps the duplicated sign bits.

The original base64_encode() from wget/http.c is broken as well,
but it is only used to encode ascii data.

-- Pascal
2004-01-26 07:17:30 +00:00
Glenn L McGrath
eaf5bc0038 Redo getconfigent, save 150 bytes, still small memory leak when
parsing invalid entries.
2004-01-20 15:32:39 +00:00
Glenn L McGrath
53766c4063 Fix up a couple of bugs i introduced in yesterdays cleanup. 2004-01-18 08:58:06 +00:00
Glenn L McGrath
58a2e0e262 Patch from Leif Lindholm (slightly modified by me), to fix http
redirection.
Example of incorrect behaviour was the following url, busybox wget didnt
get redirected to the busybox url as it should.
http://freshmeat.net/redir/busybox/953/url_homepage/www.busybox.net
2004-01-17 23:07:14 +00:00
Glenn L McGrath
036dbaa082 Modify bb_lookup_port to allow the protocol to be specified, allowing
/etc/services support for inetd, netcat and tftp.
2004-01-17 05:03:31 +00:00
Glenn L McGrath
a277e02663 The functions setconfig, enter and bump_nofile were only called once, marge them into the calling
function.
2004-01-17 03:20:46 +00:00
Glenn L McGrath
ff6ec8a2ae Use 1 line for function name and return value,
remove dofork define/variable,
dont check pid value is < or > than 0 if we know it is 0.
2004-01-17 02:47:45 +00:00
Glenn L McGrath
3e77b4e954 Remove some defined statements 2004-01-17 01:44:32 +00:00
Glenn L McGrath
c3b134f3b7 Changed #define names for common features (superficial) 2004-01-17 01:26:53 +00:00
Glenn L McGrath
2faf306c73 Use bb_get_chomped_line_from_file 2004-01-17 00:34:31 +00:00
Glenn L McGrath
f980bd5848 Fix a bug of mine, identified by Stephane Billiart 2003-12-27 00:21:47 +00:00
Russ Dill
6caa073760 it should work even if you don't assign a pidfile 2003-12-26 23:41:28 +00:00
Russ Dill
d242e49c89 fix a long standing underallocation bug 2003-12-24 19:57:13 +00:00
Russ Dill
a8992635b1 move debugging to safe place (before vfork) 2003-12-24 19:31:08 +00:00
Glenn L McGrath
236e93d133 Allow recieving file to stdout, sending files from stdin, use the '-'
filename. Save a variable.
2003-12-20 05:43:34 +00:00
Glenn L McGrath
266c1f5eff display the port number number correctly, other minor optimisations 2003-12-20 03:19:27 +00:00
Glenn L McGrath
ffccf6eb5d Change interface to bb_lookup_host, dont try and set port inside this
function as there is no gracefull way of handling failures.
Rename bb_getport to bb_lookup_port, allow a default port to be
specified so it always returns a correct value.
Modify ftpgetput/rdate/wget to use the new interface.
wget/rdate now use etc/services with a falback default value.
2003-12-20 01:47:18 +00:00
Glenn L McGrath
514aeabc36 Use getopt_ulflags 2003-12-19 12:08:56 +00:00
Eric Andersen
3752d337b3 Patch from Fillod Stephane:
* While I'm at it, there's also a "telnetd.patch" which maps CRLF to CR,
  like netkit-telnet does, required by the loosy Windows telnet clients.
2003-12-19 11:30:13 +00:00
Eric Andersen
769a3ef08d Patch from Stephane Billiart:
This removes references to config->remoteuser when
CONFIG_FEATURE_HTTPD_CGI=y but CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
2003-12-19 11:23:47 +00:00
Eric Andersen
1a773a656e Manousaridis Angelos writes:
Another issue I found was with the iproute utility. While using another
program I found that it failed because the "ip route del" command was
not found. I looked at the full iproute implementation and this command
exists. The busybox version has the "ip route delete" command. I have
created a patch which makes the "ip route del" command an alias to the
"ip route delete" command.
2003-12-19 10:47:40 +00:00
Eric Andersen
658f8b1d1a Manousaridis Angelos writes:
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-12-19 10:46:00 +00:00
Eric Andersen
b8d2cd44a6 don't use kernel headers 2003-12-19 10:40:56 +00:00
Glenn L McGrath
b51eb26568 Use getopt_ulflags 2003-12-19 10:37:52 +00:00
Russ Dill
4e864a36b6 Finish remerging busybox udhcp and udhcp. Some cleanups as well. 2003-12-18 22:25:38 +00:00
Russ Dill
e30495654d clean up some bad, bad formatting 2003-12-16 22:46:33 +00:00
Russ Dill
76729b8c69 include headers with prototypes to make sure prototypes match 2003-12-16 20:44:15 +00:00
Eric Andersen
5f46f1c241 remove reference to missing header file which is breaking the build 2003-12-16 12:04:01 +00:00
Russ Dill
6b3f757053 revert removal of define 2003-12-16 02:38:09 +00:00
Russ Dill
4040d3d712 forgotten include 2003-12-16 02:34:28 +00:00
Russ Dill
8b3845106a why the complication of a static string rather than a define? gcc isn't dumb 2003-12-16 02:30:53 +00:00
Russ Dill
4b77acafa6 start attempting to bring udhcp in busybox back to the state where it is (ideally) an exact copy of udhcp outside of busybox so that its easy to merge back and forth 2003-12-16 02:28:20 +00:00
Russ Dill
7becf5987a when compiled standalone, udhcp needs these headers 2003-12-16 01:42:18 +00:00
Russ Dill
a3170d5aab whoops 2003-12-16 01:33:38 +00:00
Russ Dill
8f43126934 not sure who made this change, but it certainly mucks things up (note 'fwrite(leases, ...'), adds a bit more code, and some stack overhead. Anywho, this fixes it, and retains the spirit of what the submitter of this change was attempting to acheive (the entire lease is written at once in a struct) 2003-12-16 01:29:40 +00:00
Russ Dill
62419df95c make udhcp work under uclinux, to an extent 2003-12-15 22:11:26 +00:00
Russ Dill
4a9e34c148 options is a pretty common symbol, bad idea to use as a global in udhcp when compiling into busybox 2003-12-15 22:09:36 +00:00
Glenn L McGrath
9adcf73152 Stop sending data to the client after the first failure.
Patch by Joe.C
2003-12-08 20:21:53 +00:00
Glenn L McGrath
7ffe133864 As we no longer use function pointers for read in common archiving code
archive_xread can be replaced with bb_full_read, and archive_copy_file
with bb_copyfd*
bb_copyfd is split into two functions bb_copyfd_size and bb_copyfd_eof,
they share a common backend.
2003-11-21 22:24:57 +00:00
Eric Andersen
b6e58d2b9a Michael Smith writes:
I noticed a problem with ifconfig in busybox 0.60.5. The matching code
seems to exist in busybox CVS as well, so I'll paste in the patch that
fixed it.

I was running:
 # ifconfig wan0 1.2.3.4 pointopoint 1.2.3.5 netmask 255.255.255.255

I was seeing the inet addr and P-t-P addr both being set to 1.2.3.5
(the pointopoint address).

wan0      Link encap:Point-Point Protocol
          inet addr:1.2.3.5  P-t-P:1.2.3.5  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          ...

The patch below seems to fix it.
2003-11-14 03:04:08 +00:00
Eric Andersen
c16686c1e2 Ulrich Marx writes:
hello

i had some trouble with the filedescriptor in udhcp.
Two things happened on my device:
1.) broken or not connected cable (no dhcp-server)
2.) daemonizing (starting with option -b)

i got a filedescriptor fd=0 from function raw_socket,
after daemonizing (daemon call) the fd is closed.
Client can't recieve data's anymore.

i fixed this problem (like pidfile handling):
2003-11-14 03:00:04 +00:00
Eric Andersen
04d055f4e1 Fix rdate and ftpget/ftpput so they compile with the new xconnect.
I have checked rdate.  Someone should also check ftpget/ftpput to
be sure they still work.
2003-11-03 21:20:18 +00:00
Eric Andersen
e6dc439b3a Rework wget, the xconnect interface, and its various clients
in order to fix the problems with round robin DNS reported
by Andrew Flegg:
    http://busybox.net/lists/busybox/2003-October/009579.html

This removes the ipv6 specific xconnect dns lookups.  I do
not see why that would need to be special cased for ipv6 as
was done, but that will just have to be tested.

So IPV6 people -- please test this change!

 -Erik
2003-10-31 09:31:46 +00:00
Eric Andersen
88c916bdec Andreas Mohr writes:
the busybox menuconfig triggered my "inacceptable number of spelling mistakes"
upper level, so I decided to make a patch ;-)

I also improved some wording to describe some things in a better way.

Many thanks for an incredible piece of software!

Andreas Mohr, random OSS developer
2003-10-22 09:58:56 +00:00
Glenn L McGrath
9d1a33c690 Vodz last_patch_105 without his xargs patch which doenst apply cleanly 2003-10-06 13:23:06 +00:00
Glenn L McGrath
1dc0ccafdd Vodz, last_patch_114
- env vars CONTENT_TYPE, CONTENT_LENGTH, HTTPD_REFERER, REMOTE_USER and
AUTH_TYPE(Basic always).
- POST data pipied now (previous version have loading into memory may be
big size data and reducing with hardcoded limit)
- removed $CGI_foo environment variables, else my have rubbish
enviroment if POST data have big binary file
2003-10-03 10:50:56 +00:00
Glenn L McGrath
6b0658f5c0 Patch by Fillod Stephane, declare variables as static to not clobber
busybox namespace
2003-09-26 00:33:18 +00:00
Glenn L McGrath
baaa6e9e7d Patch from Stephane Billiart to fix an unused variable warning. 2003-09-15 15:00:43 +00:00
Eric Andersen
8efe967018 Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)
to ensure proper fallback behavior on, i.e. serial consoles.
 -Erik
2003-09-15 08:33:45 +00:00
Glenn L McGrath
c2b9186be1 Fix compile error, Vodz, last_path_113 2003-09-12 11:27:15 +00:00
Eric Andersen
eb213bd2a2 As vodz just pointed out, I screwup up the call to bb_xasprintf! 2003-09-12 08:39:05 +00:00
Eric Andersen
51ed242ad6 Invoke run-parts on /etc/network/if-*.d per the behavior of
the upstream ifupdown code...
2003-09-12 05:59:53 +00:00
Glenn L McGrath
14092a1ed2 Busybox CVS version ipcalc have problems:
- Can`t use 255.255.255.255 address
- typo: double check for valid ip address and uncheck for valid mask

httpd unseted SERVER_PORT (my bug from last_patch111).

last_patch_112 from Vladimir N. Oleynik
2003-09-12 00:44:50 +00:00
Eric Andersen
6231f092bd Patch from Philip Blundell:
On Thu, 2003-09-11 at 01:09, Glenn McGrath wrote:
> Applied

Thanks.  Unfortunately there was one small bug in that last patch.
Could you apply this one as well?

p.
2003-09-11 08:25:11 +00:00
Glenn L McGrath
cc20ebc11e add ipv6 literal support to wget 2003-09-10 23:52:15 +00:00
Glenn L McGrath
fe538ba5d6 Vodz, last_patch_104 2003-09-10 23:35:45 +00:00
Glenn L McGrath
5875be406e Vodz, last_patch_110
no limit, no memory usage for env buffer, always call putenv().
remove small error for previous last_patch109.
2003-09-08 15:39:09 +00:00
Glenn L McGrath
b65422cf65 last_patch_109 from Vladimir N. Oleynik
Busybox`s httpd have the defect (from born):
ip 1.2.3.1 have true comparing also with
1.2.3.10-1.2.3.19 and 1.2.3.100-1.2.3.199.
Last patch removed this bug and added feature:
allow/deny rule can support network/netmask
example: 1.2.3.0/255.255.255.128
  or
network/mask_bits
example: 1.2.3.0/25
now; old format
1
1.2
1.2.3
1.2.3.4
too support and converted to
1/8 1.2/16 1.2.3/24 1.2.3.4/32
automaticaly.

Also, current CVS have small problem: ignores
A:IP, (loses 'A', 'a' only work). Corrected.
2003-09-08 10:59:27 +00:00
Glenn L McGrath
d6bdd5dc08 Small bug in silent option 2003-09-05 02:37:15 +00:00
Glenn L McGrath
530ea42abc adds the ability to use and calculate network prefix specifications instead
of netmasks. It also fixes the parameters for network and netmask to match
that of the official Red Hat version (-n for network and -m for netmask).
Patch by Joshua Jackson
2003-09-02 06:59:57 +00:00
Glenn L McGrath
dc4e75ef7c move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
constant.
Vodz last_patch_107
2003-09-02 02:36:18 +00:00
Glenn L McGrath
d9461f887e Allow one to detect and handle the case where no lease could be obtained
via DHCP. (Just add a section "failed" to your script.)
Patch by Steven Scholz
2003-09-01 04:08:36 +00:00
Glenn L McGrath
29a05f56d5 "Without this patch, udhcpcd output may be buffered and delayed for
for minutes if stdout is not a tty." -vda@
2003-08-30 04:47:36 +00:00
Glenn L McGrath
5cd6461b6f "Due to a wrong format parameter in a printf httpd does not work when
compiled for with CONFIG_LFS (large file support).
The attached patch suggested by Vladimir fixes that." - Steven Scholz
2003-08-29 15:53:23 +00:00
Glenn L McGrath
8ce8f9b482 Remove stray '\n' 2003-08-29 15:19:44 +00:00
Glenn L McGrath
2233685f00 Remove unused files 2003-08-29 15:03:12 +00:00
Glenn L McGrath
08dea3e5a7 "This function was not updating the argc and argv pointers to reflect
the arguments it consumed, which means the calling function encountered
them as well.  As a result, a command like "ip -6 addr" was yielding a usage
error." - Philip Blundell
2003-08-29 10:58:46 +00:00
Glenn L McGrath
62b031fb82 label's dont work in v4 tunnels, patch by Eric Spakman 2003-08-29 07:47:52 +00:00
Glenn L McGrath
23365976f8 Correct logic in determining size of block to download, as pointed out
by Junio C Hamano
2003-08-29 06:25:04 +00:00
Glenn L McGrath
e7bdfccb3f "When the initial request by wget is responded by a 3XX redirect
response sent in chunked transfer encoding, the code path to
resubmit the request to the redirected URL forgets to reset
got_clen and chunked variables in the loop.  If the redirected
URL does not use chunked transfer encoding, this causes the code
that slurps the body of the response to incorrectly try to parse
out the chunk length which does not exist." - junkio@

----------------------------------------------------------------------
2003-08-28 22:03:19 +00:00
Glenn L McGrath
83e4a5bccf "When the filesize is known from content-length header, safe_fread is
always told to read sizeof(buf).  This waits until the underlying
fread() to time-out for the last part of the downloaded body.  Fix
this by sending the number of remaining bytes to read when known." -
junkio@
I reworked the logic in his patch
2003-08-28 21:55:22 +00:00
Glenn L McGrath
8b96b7169d *** empty log message *** 2003-08-28 19:54:16 +00:00
Eric Andersen
c601ff149a Begin using the new "select" option. Good stuff! 2003-08-08 23:12:12 +00:00
Eric Andersen
fdd2a0f318 Eric Spakman writes:
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-08-06 09:23:44 +00:00
Eric Andersen
76097edc0e Eric Spakman writes:
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-30 08:22:53 +00:00
Eric Andersen
b99aec0ba5 Christian Meyer provided this patch to fix more bugs with the tftp client 2003-07-30 07:16:39 +00:00