aboutsummaryrefslogtreecommitdiffstats
path: root/src/libexec/deddos.c
diff options
context:
space:
mode:
authorEpoch Qwert <epoch@53flpnlls43fcguy.onion>2014-12-30 07:25:39 -0600
committerEpoch Qwert <epoch@53flpnlls43fcguy.onion>2014-12-30 07:25:39 -0600
commit86ba931697790d4da2515f4457ebfb3f20b43860 (patch)
tree839c1f7ae94fd32639d3311c3a2faee34f88f04c /src/libexec/deddos.c
parent05d677a3d3e9e540dffd35c76e35335bf43ead7d (diff)
downloadmisc-86ba931697790d4da2515f4457ebfb3f20b43860.tar.gz
misc-86ba931697790d4da2515f4457ebfb3f20b43860.zip
all those .c changes were mostly fixes of warnings for the change in rebuild.sh being changed to use -Wall.
gethostbyname was almost completely rewritten to work better with ipv6 for gopherd.sh gopherd.sh was rewritten to use gethostbyname instead of dig and to cut out any link-local interface indicators from the output of hop0 and to ignore an error if ipA -> hostname -> ipB causes ipA to be not the same as ipB. Don't remember if there's anything else.
Diffstat (limited to 'src/libexec/deddos.c')
-rw-r--r--src/libexec/deddos.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libexec/deddos.c b/src/libexec/deddos.c
index 245ba41..0af7414 100644
--- a/src/libexec/deddos.c
+++ b/src/libexec/deddos.c
@@ -1,4 +1,4 @@
-
+#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
@@ -13,11 +13,9 @@ int main(int argc,char *argv[]) {
struct sockaddr sa;
signal(SIGALRM,exit);
alarm(10);
- int sl=sizeof(sa);
+ unsigned int sl=sizeof(sa);
char host[256];
char serv[256];
- char cmd[256];
- char line[256];
char iface[256];
char *name[16];
getpeername(0,&sa,&sl);
@@ -49,5 +47,5 @@ int main(int argc,char *argv[]) {
name[8]="UDP";
name[9]=0;
execv(name[0],name);
- printf("shit fucked.\n");
+ return printf("shit fucked.\n");
}