diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-21 18:18:48 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-21 18:18:48 +0200 |
commit | 47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 (patch) | |
tree | 05127e986021176649f2dd660a92ef8b8e107e92 /networking | |
parent | e6a2f4cc5a47d3022bdf5ca2cacbaa5a8c5baf7a (diff) |
*: add most of the required setup_common_bufsiz() calls
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/arp.c | 1 | ||||
-rw-r--r-- | networking/arping.c | 1 | ||||
-rw-r--r-- | networking/ftpd.c | 1 | ||||
-rw-r--r-- | networking/ftpgetput.c | 1 | ||||
-rw-r--r-- | networking/ifupdown.c | 2 | ||||
-rw-r--r-- | networking/inetd.c | 1 | ||||
-rw-r--r-- | networking/ping.c | 3 | ||||
-rw-r--r-- | networking/slattach.c | 2 | ||||
-rw-r--r-- | networking/tc.c | 1 | ||||
-rw-r--r-- | networking/tcpudp.c | 1 | ||||
-rw-r--r-- | networking/telnet.c | 1 | ||||
-rw-r--r-- | networking/telnetd.c | 1 | ||||
-rw-r--r-- | networking/tftp.c | 1 | ||||
-rw-r--r-- | networking/udhcp/dhcprelay.c | 3 | ||||
-rw-r--r-- | networking/zcip.c | 2 |
15 files changed, 18 insertions, 4 deletions
diff --git a/networking/arp.c b/networking/arp.c index 5f7818663..9381eb53a 100644 --- a/networking/arp.c +++ b/networking/arp.c @@ -76,6 +76,7 @@ struct globals { #define device (G.device ) #define hw_set (G.hw_set ) #define INIT_G() do { \ + setup_common_bufsiz(); \ device = ""; \ } while (0) diff --git a/networking/arping.c b/networking/arping.c index 52f5ba51f..6b0de4de2 100644 --- a/networking/arping.c +++ b/networking/arping.c @@ -77,6 +77,7 @@ struct globals { #define brd_recv (G.brd_recv ) #define req_recv (G.req_recv ) #define INIT_G() do { \ + setup_common_bufsiz(); \ count = -1; \ } while (0) diff --git a/networking/ftpd.c b/networking/ftpd.c index 8553a28f5..360d1e6be 100644 --- a/networking/ftpd.c +++ b/networking/ftpd.c @@ -126,6 +126,7 @@ struct globals { } FIX_ALIASING; #define G (*(struct globals*)bb_common_bufsiz1) #define INIT_G() do { \ + setup_common_bufsiz(); \ /* Moved to main */ \ /*strcpy(G.msg_ok + 4, MSG_OK );*/ \ /*strcpy(G.msg_err + 4, MSG_ERR);*/ \ diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index 61bc45c4e..91fb4569a 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c @@ -71,6 +71,7 @@ enum { BUFSZ = COMMON_BUFSIZE - offsetof(struct globals, buf) }; #define do_continue (G.do_continue ) #define buf (G.buf ) #define INIT_G() do { \ + setup_common_bufsiz(); \ BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ } while (0) diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 399ff6b5d..25b04c9d7 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c @@ -131,7 +131,7 @@ struct globals { char *shell; } FIX_ALIASING; #define G (*(struct globals*)bb_common_bufsiz1) -#define INIT_G() do { } while (0) +#define INIT_G() do { setup_common_bufsiz(); } while (0) static const char keywords_up_down[] ALIGN1 = diff --git a/networking/inetd.c b/networking/inetd.c index aa35ffa2b..8d44b5198 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -350,6 +350,7 @@ enum { LINE_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line) }; #define allsock (G.allsock ) #define line (G.line ) #define INIT_G() do { \ + setup_common_bufsiz(); \ BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ rlim_ofile_cur = OPEN_MAX; \ global_queuelen = 128; \ diff --git a/networking/ping.c b/networking/ping.c index 761660979..cfe682646 100644 --- a/networking/ping.c +++ b/networking/ping.c @@ -188,7 +188,7 @@ struct globals { char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN]; } FIX_ALIASING; #define G (*(struct globals*)bb_common_bufsiz1) -#define INIT_G() do { } while (0) +#define INIT_G() do { setup_common_bufsiz(); } while (0) static void noresp(int ign UNUSED_PARAM) { @@ -398,6 +398,7 @@ struct globals { #define pingaddr (G.pingaddr ) #define rcvd_tbl (G.rcvd_tbl ) #define INIT_G() do { \ + setup_common_bufsiz(); \ BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ datalen = DEFDATALEN; \ timeout = MAXWAIT; \ diff --git a/networking/slattach.c b/networking/slattach.c index d9d8fe7b8..2d1305e32 100644 --- a/networking/slattach.c +++ b/networking/slattach.c @@ -39,7 +39,7 @@ struct globals { #define handle (G.handle ) #define saved_disc (G.saved_disc ) #define saved_state (G.saved_state ) -#define INIT_G() do { } while (0) +#define INIT_G() do { setup_common_bufsiz(); } while (0) /* diff --git a/networking/tc.c b/networking/tc.c index 1372ca081..d0bcbdeaa 100644 --- a/networking/tc.c +++ b/networking/tc.c @@ -71,6 +71,7 @@ struct globals { #define filter_prio (G.filter_prio) #define filter_proto (G.filter_proto) #define INIT_G() do { \ + setup_common_bufsiz(); \ BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ } while (0) diff --git a/networking/tcpudp.c b/networking/tcpudp.c index 624973042..31bc70459 100644 --- a/networking/tcpudp.c +++ b/networking/tcpudp.c @@ -101,6 +101,7 @@ struct globals { #define env_cur (G.env_cur ) #define env_var (G.env_var ) #define INIT_G() do { \ + setup_common_bufsiz(); \ cmax = 30; \ env_cur = &env_var[0]; \ } while (0) diff --git a/networking/telnet.c b/networking/telnet.c index 2946bc831..d2daf5c8c 100644 --- a/networking/telnet.c +++ b/networking/telnet.c @@ -111,6 +111,7 @@ struct globals { } FIX_ALIASING; #define G (*(struct globals*)bb_common_bufsiz1) #define INIT_G() do { \ + setup_common_bufsiz(); \ BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ } while (0) diff --git a/networking/telnetd.c b/networking/telnetd.c index 13d5a8f64..13c36aa46 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c @@ -85,6 +85,7 @@ struct globals { } FIX_ALIASING; #define G (*(struct globals*)bb_common_bufsiz1) #define INIT_G() do { \ + setup_common_bufsiz(); \ G.loginpath = "/bin/login"; \ G.issuefile = "/etc/issue.net"; \ } while (0) diff --git a/networking/tftp.c b/networking/tftp.c index 8aeb79aca..e879c4674 100644 --- a/networking/tftp.c +++ b/networking/tftp.c @@ -131,6 +131,7 @@ struct globals { } FIX_ALIASING; #define G (*(struct globals*)bb_common_bufsiz1) #define INIT_G() do { \ + setup_common_bufsiz(); \ BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ } while (0) diff --git a/networking/udhcp/dhcprelay.c b/networking/udhcp/dhcprelay.c index 1722a85de..f52a0cf88 100644 --- a/networking/udhcp/dhcprelay.c +++ b/networking/udhcp/dhcprelay.c @@ -34,6 +34,7 @@ struct xid_item { } FIX_ALIASING; #define dhcprelay_xid_list (*(struct xid_item*)bb_common_bufsiz1) +#define INIT_G() do { setup_common_bufsiz(); } while (0) static struct xid_item *xid_add(uint32_t xid, struct sockaddr_in *ip, int client) { @@ -257,6 +258,8 @@ int dhcprelay_main(int argc, char **argv) int num_sockets, max_socket; uint32_t our_nip; + INIT_G(); + server_addr.sin_family = AF_INET; server_addr.sin_addr.s_addr = htonl(INADDR_BROADCAST); server_addr.sin_port = htons(SERVER_PORT); diff --git a/networking/zcip.c b/networking/zcip.c index 79643458c..47f3216a0 100644 --- a/networking/zcip.c +++ b/networking/zcip.c @@ -92,7 +92,7 @@ struct globals { uint32_t localnet_ip; } FIX_ALIASING; #define G (*(struct globals*)bb_common_bufsiz1) -#define INIT_G() do { } while (0) +#define INIT_G() do { setup_common_bufsiz(); } while (0) /** |