ports/126886: [MAINTAINER] dns/dns_mre: "Socket is already connected" error
Tomoyuki Sakurai
cherry at trombik.org
Wed Aug 27 12:40:10 UTC 2008
>Number: 126886
>Category: ports
>Synopsis: [MAINTAINER] dns/dns_mre: "Socket is already connected" error
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Wed Aug 27 12:40:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Tomoyuki Sakurai
>Release: FreeBSD 7.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD spica.trombik.org 7.0-STABLE FreeBSD 7.0-STABLE #5: Thu Jul 10 22:29:26 JST 2008
>Description:
- do not connect before sendto()
fixes "Socket is already connected" error
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- dns_mre-1.0_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/dns/dns_mre/Makefile /usr/home/cherry/svk/ports/dns/dns_mre/Makefile
--- /usr/ports/dns/dns_mre/Makefile 2008-08-08 06:28:14.000000000 +0900
+++ /usr/home/cherry/svk/ports/dns/dns_mre/Makefile 2008-08-27 21:26:57.000000000 +0900
@@ -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 -ruN --exclude=CVS /usr/ports/dns/dns_mre/files/patch-dns_mre.c /usr/home/cherry/svk/ports/dns/dns_mre/files/patch-dns_mre.c
--- /usr/ports/dns/dns_mre/files/patch-dns_mre.c 2008-08-08 06:28:14.000000000 +0900
+++ /usr/home/cherry/svk/ports/dns/dns_mre/files/patch-dns_mre.c 2008-08-27 21:26:57.000000000 +0900
@@ -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);
--- dns_mre-1.0_1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list