diff options
author | edwin <edwin@FreeBSD.org> | 2013-10-15 04:38:33 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2013-10-15 04:38:33 +0800 |
commit | c71ebeba5f5c2f548801ddd9e69bb33ee0b02801 (patch) | |
tree | 11643b130e2f6b807e39198142ac85b3bca60d4c /net/sniffit | |
parent | a22a2213ecd4a489d440aa0c225c039189a14ff6 (diff) | |
download | freebsd-ports-gnome-c71ebeba5f5c2f548801ddd9e69bb33ee0b02801.tar.gz freebsd-ports-gnome-c71ebeba5f5c2f548801ddd9e69bb33ee0b02801.tar.zst freebsd-ports-gnome-c71ebeba5f5c2f548801ddd9e69bb33ee0b02801.zip |
Fix build on 10.0
Diffstat (limited to 'net/sniffit')
-rw-r--r-- | net/sniffit/Makefile | 8 | ||||
-rw-r--r-- | net/sniffit/files/patch-sn_analyse.c | 37 | ||||
-rw-r--r-- | net/sniffit/files/patch-sniffit.0.3.7.c | 78 |
3 files changed, 119 insertions, 4 deletions
diff --git a/net/sniffit/Makefile b/net/sniffit/Makefile index 681610592d2f..989f1d1970d1 100644 --- a/net/sniffit/Makefile +++ b/net/sniffit/Makefile @@ -3,18 +3,18 @@ PORTNAME= sniffit PORTVERSION= 0.3.7b -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net security MASTER_SITES= http://www.mavetju.org/download/adopted/ DISTNAME= sniffit.0.3.7.beta PATCH_SITES= ${MASTER_SITE_DEBIAN_POOL} \ - http://www.mavetju.org/download/adopted/ -PATCHFILES= sniffit_0.3.7.beta-10.diff.gz + http://www.mavetju.org/download/adopted/:patches +PATCHFILES= sniffit_0.3.7.beta-10.diff.gz:patches PATCH_DIST_STRIP= -p1 MAINTAINER= edwin@mavetju.org -COMMENT= A packet sniffer program. For educational use +COMMENT= A packet sniffer program. For educational use GNU_CONFIGURE= yes ALL_TARGET= diff --git a/net/sniffit/files/patch-sn_analyse.c b/net/sniffit/files/patch-sn_analyse.c new file mode 100644 index 000000000000..511260b0a81c --- /dev/null +++ b/net/sniffit/files/patch-sn_analyse.c @@ -0,0 +1,37 @@ +--- sn_analyse.c.orig 2013-10-15 18:31:28.000000000 +1100 ++++ sn_analyse.c 2013-10-15 18:32:24.000000000 +1100 +@@ -10,7 +10,7 @@ + { + if(finish!=TCP_FINISH) + if((dummy_pointer=add_dynam(filename, TCP, 0,ntohl(tcphead.seq_nr),info.DATA_len))==NULL) +- return; ++ return NULL; + }; + + if(finish==TCP_FINISH) /* let's reset the connection */ +@@ -26,7 +26,7 @@ + if(dummy&SYN) print_conn(filename,"Connection initiated. (SYN)"); + if(dummy&FIN) print_conn(filename,"Connection ending. (FIN)"); + if(dummy&RST) print_conn(filename,"Connection reset. (RST)"); +- return; ++ return NULL; + }; + + data = sp+PROTO_HEAD+info.IP_len+info.TCP_len; +@@ -40,7 +40,7 @@ + }; + }; + +-if((dummy&FIN)||(dummy&RST)) return; /* needed, cauz entry don't exist */ ++if((dummy&FIN)||(dummy&RST)) return NULL; /* needed, cauz entry don't exist */ + + /*** TELNET *****************************************************************/ + if(LOGPARAM & LOGPARAM_TELNET) +@@ -197,5 +197,5 @@ + if(ntohl(tcphead.seq_nr)>dummy_pointer->exp_seq) + dummy_pointer->exp_seq=ntohl(tcphead.seq_nr)+info.DATA_len; + } +-return; +-return; /* DON'T FORGET THEM!!!! */ ++return NULL; ++return NULL; /* DON'T FORGET THEM!!!! */ diff --git a/net/sniffit/files/patch-sniffit.0.3.7.c b/net/sniffit/files/patch-sniffit.0.3.7.c new file mode 100644 index 000000000000..685afd247d21 --- /dev/null +++ b/net/sniffit/files/patch-sniffit.0.3.7.c @@ -0,0 +1,78 @@ +--- sniffit.0.3.7.c.orig 2013-10-15 18:30:42.000000000 +1100 ++++ sniffit.0.3.7.c 2013-10-15 18:33:29.000000000 +1100 +@@ -1091,19 +1091,19 @@ + finish = check_packet (ipaddr, p_header, sp, filename, filename2, &info, header, SNIFMODE); + + if (finish == DROP_PACKET) +- return; /* Packet is broken */ ++ return 0; /* Packet is broken */ + + if( (PROTOCOLS&F_IP)&&((PROTOCOLS&F_TCP)==0)) + memcpy (&iphead, (sp + PROTO_HEAD), sizeof (struct IP_header)), + print_iphead (&iphead, 0); + + if (finish == DONT_EXAMINE) +- return; /* Packet is not for us */ ++ return 0; /* Packet is not for us */ + + if(DUMPMODE==8) /* Recording */ + { + pcap_dump((unsigned char *) dev_dump, p_header, sp); +- return; ++ return 0; + } + + if((PROTOCOLS & F_IP)&&(PROTOCOLS & F_TCP)&&(finish<10)) +@@ -1184,11 +1184,11 @@ + if (status == 0) + { + if (finish == TCP_FINISH) +- return; ++ return 0; + /* there was never data transmitted */ + /* seq_nr & datalen not important here yet */ + if ((dummy_pointer = add_dynam (filename, TCP, 1, 0, 0)) == NULL) +- return; ++ return 0; + } + f = dummy_pointer->f; + +@@ -1254,7 +1254,7 @@ + printf ("\nYou mixed incompatible options!\n"); + exit (1); + } +- return; ++ return 0; + } + + if ((finish < 10) && (LOGPARAM != 0)) /* TCP packet - logfile */ +@@ -1334,7 +1334,7 @@ + break; + } + printf ("\n"); +- return; ++ return 0; + } + if (finish < 30) /* nothing yet */ + { +@@ -1367,7 +1367,7 @@ + printf ("\nImpossible error! Sniffer Hartattack!\n"); + exit (0); + } +- return; ++ return 0; + } + } + +@@ -1480,9 +1480,9 @@ + + finish = check_mask (p_header, sp, conn_name, conn_name2, desc_string, &info); + if (finish == DROP_PACKET) +- return; /* Packet is broken */ ++ return 0; /* Packet is broken */ + if (finish == DONT_EXAMINE) +- return; /* Packet is not for us */ ++ return 0; /* Packet is not for us */ + + if (finish != TCP_FINISH) /* finish: already logged, or to short to add */ + add_itemlist (running_connections, conn_name, desc_string); |