aboutsummaryrefslogtreecommitdiff
path: root/dns/dnshijacker
diff options
context:
space:
mode:
authorJean-Yves Lefort <jylefort@FreeBSD.org>2005-04-21 13:29:42 +0000
committerJean-Yves Lefort <jylefort@FreeBSD.org>2005-04-21 13:29:42 +0000
commit693ba532be688c6d13c90224e198506975e31860 (patch)
tree95c1375c58afdc42bf7183cd38d9c578accba610 /dns/dnshijacker
parent53870b0660d8796c8fc640254460f9460dc3e7e0 (diff)
downloadports-693ba532be688c6d13c90224e198506975e31860.tar.gz
ports-693ba532be688c6d13c90224e198506975e31860.zip
- Fix the checksum of spoofed packets
- Honor NOPORTDOCS PR: ports/80161 Submitted by: David Thiel <lx@redundancy.redundancy.org> (maintainer) Approved by: adamw (mentor)
Notes
Notes: svn path=/head/; revision=133848
Diffstat (limited to 'dns/dnshijacker')
-rw-r--r--dns/dnshijacker/Makefile7
-rw-r--r--dns/dnshijacker/files/patch-dnshijacker.c11
2 files changed, 17 insertions, 1 deletions
diff --git a/dns/dnshijacker/Makefile b/dns/dnshijacker/Makefile
index 94a627cf4670..25b066a0c254 100644
--- a/dns/dnshijacker/Makefile
+++ b/dns/dnshijacker/Makefile
@@ -7,7 +7,7 @@
PORTNAME= dnshijacker
PORTVERSION= 1.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= dns security
MASTER_SITES= http://pedram.redhive.com/downloads/
@@ -19,7 +19,10 @@ BUILD_DEPENDS= ${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet
LDFLAGS+= -lpcap -lnet
PLIST_FILES= bin/dnshijacker
+
+.if !defined(NOPORTDOCS)
PORTDOCS= README
+.endif
do-build:
cd ${WRKSRC} && \
@@ -29,7 +32,9 @@ do-build:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/dnshijacker ${PREFIX}/bin
+.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+.endif
.include <bsd.port.mk>
diff --git a/dns/dnshijacker/files/patch-dnshijacker.c b/dns/dnshijacker/files/patch-dnshijacker.c
new file mode 100644
index 000000000000..a88cf7369e9c
--- /dev/null
+++ b/dns/dnshijacker/files/patch-dnshijacker.c
@@ -0,0 +1,11 @@
+--- dnshijacker.c.orig Thu Apr 21 00:40:59 2005
++++ dnshijacker.c Thu Apr 21 00:41:29 2005
+@@ -733,7 +733,7 @@
+ * source and destination are swapped here because we are spoofing a reply
+ */
+
+- libnet_build_ip(LIBNET_UDP_H + LIBNET_DNS_H,
++ libnet_build_ip(packet_size - LIBNET_IP_H,
+ 0, /* ip tos */
+ 0, /* ip id */
+ 0, /* fragmentation bits */