diff options
author | Rob Landley <rob@landley.net> | 2005-08-12 06:06:54 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2005-08-12 06:06:54 +0000 |
commit | d5138f44fe2e496498c62a06b7f50381edf952da (patch) | |
tree | b0c7e721ab4924d93491876f5e859389eb22b039 /busybox/networking | |
parent | 9344d8aa10ecf99aba3eae97e4fa131360f89729 (diff) | |
download | busybox-w32-d5138f44fe2e496498c62a06b7f50381edf952da.tar.gz busybox-w32-d5138f44fe2e496498c62a06b7f50381edf952da.tar.bz2 busybox-w32-d5138f44fe2e496498c62a06b7f50381edf952da.zip |
Backport 10853, 10860/10870, and 10862.
Diffstat (limited to 'busybox/networking')
-rw-r--r-- | busybox/networking/nc.c | 7 | ||||
-rw-r--r-- | busybox/networking/traceroute.c | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/busybox/networking/nc.c b/busybox/networking/nc.c index ab8ec0cd5..6ce85fecf 100644 --- a/busybox/networking/nc.c +++ b/busybox/networking/nc.c | |||
@@ -161,8 +161,11 @@ int nc_main(int argc, char **argv) | |||
161 | exit(0); | 161 | exit(0); |
162 | ofd = STDOUT_FILENO; | 162 | ofd = STDOUT_FILENO; |
163 | } else { | 163 | } else { |
164 | if (nread == 0) | 164 | if (nread <= 0) { |
165 | shutdown(sfd, 1); | 165 | shutdown(sfd, 1 /* send */ ); |
166 | close(STDIN_FILENO); | ||
167 | FD_CLR(STDIN_FILENO, &readfds); | ||
168 | } | ||
166 | ofd = sfd; | 169 | ofd = sfd; |
167 | } | 170 | } |
168 | 171 | ||
diff --git a/busybox/networking/traceroute.c b/busybox/networking/traceroute.c index 44ffdf07e..cf90ec088 100644 --- a/busybox/networking/traceroute.c +++ b/busybox/networking/traceroute.c | |||
@@ -101,7 +101,8 @@ struct opacket { | |||
101 | 101 | ||
102 | #include "busybox.h" | 102 | #include "busybox.h" |
103 | 103 | ||
104 | static u_char packet[512]; /* last inbound (icmp) packet */ | 104 | /* last inbound (icmp) packet */ |
105 | static u_char packet[512] __attribute__ ((aligned)); | ||
105 | static struct opacket *outpacket; /* last output (udp) packet */ | 106 | static struct opacket *outpacket; /* last output (udp) packet */ |
106 | 107 | ||
107 | static int s; /* receive (icmp) socket file descriptor */ | 108 | static int s; /* receive (icmp) socket file descriptor */ |