summaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2008-08-29 15:08:04 +0000
committerMartin Wilke <miwi@FreeBSD.org>2008-08-29 15:08:04 +0000
commita64da288f82c2486369836c50543e09616a133cd (patch)
tree6ae8fed7adb15455bbea37949746d09b4cfbc0eb /dns
parentcf9b482030ea560cbc73902b90998823e037514c (diff)
downloadfreebsd-ports-a64da288f82c2486369836c50543e09616a133cd.zip
- do not connect before sendto()
fixes "Socket is already connected" error - Bump PORTREVISION PR: 126886 Submitted by: maintainer
Diffstat (limited to 'dns')
-rw-r--r--dns/dns_mre/Makefile1
-rw-r--r--dns/dns_mre/files/patch-dns_mre.c18
2 files changed, 17 insertions, 2 deletions
diff --git a/dns/dns_mre/Makefile b/dns/dns_mre/Makefile
index aac8e28a7e6e..d1bef60e4c54 100644
--- a/dns/dns_mre/Makefile
+++ b/dns/dns_mre/Makefile
@@ -7,6 +7,7 @@
PORTNAME= dns_mre
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= dns security
MASTER_SITES= http://www.securebits.org/tools/
DISTNAME= ${PORTNAME}-v${PORTVERSION}
diff --git a/dns/dns_mre/files/patch-dns_mre.c b/dns/dns_mre/files/patch-dns_mre.c
index 7f95557f77ab..e2f87016e2eb 100644
--- a/dns/dns_mre/files/patch-dns_mre.c
+++ b/dns/dns_mre/files/patch-dns_mre.c
@@ -1,5 +1,5 @@
--- dns_mre.c.orig 2008-08-02 01:23:19.000000000 +0900
-+++ dns_mre.c 2008-08-02 20:37:50.000000000 +0900
++++ dns_mre.c 2008-08-27 21:20:44.000000000 +0900
@@ -160,7 +160,6 @@
u_int8_t * udp_pointer = NULL;
u_int8_t * dns_pointer = NULL;
@@ -17,7 +17,21 @@
int i;
if( !answer_flag )
-@@ -797,6 +796,7 @@
+@@ -720,13 +719,6 @@
+ exit(1);
+ }
+
+- /* Connect to the DNS Server */
+- if( connect(sockfd, (struct sockaddr *) &q_d_addr, sizeof( q_d_addr )) == -1 )
+- {
+- perror("connect()");
+- exit(1);
+- }
+-
+ /* Send the DNS Query */
+ if( (numbytes = sendto(sockfd, (char *) payload, payload_size, 0,
+ (struct sockaddr *)&q_d_addr, sizeof( q_d_addr ))) == -1 )
+@@ -797,6 +789,7 @@
" -x <no_txids> Number of static Transaction IDs to use (optional; default 15)\n"
" -v Verbosity\n"
, cmd);