SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] ext_sendto() failing with "Error 5: Input/Output Error" on IPv6


Chronological Thread 
  • From: Thomas Dreibholz <dreibh AT iem.uni-due.de>
  • To: Amit Varshney <varshney.amitk AT gmail.com>, sctp-discussion AT sctp.de
  • Subject: Re: [SCTP-Discussion] ext_sendto() failing with "Error 5: Input/Output Error" on IPv6
  • Date: Wed, 14 Dec 2011 08:36:46 +0100
  • List-archive: <http://lists.franken.de/pipermail/sctp-discussion>
  • List-id: SCTP Discussions <sctp-discussion.sctp.de>
  • Organization: University of Duisburg-Essen, Institute for Experimental Mathematics

Dear Amit,

please could you try the attached patch. It changes the file distribution.c
in
sctplib/sctp of the sctplib package. It should fix the problem.

Explanation:
For IPv6, an address had been mistakenly handled as invalid if source ==
destination, with the exception of the loopback address (::1). Since OOTB
handling had been disabled, no ABORTs have been observable in your pcap
trace.
The INIT just has been dropped silently by the server-side instance.


Am Freitag 11 November 2011, 18:48:23 schrieb Amit Varshney:
> Hi Thomas,
>
> On Thu, Nov 10, 2011 at 2:50 PM, Thomas Dreibholz
> <dreibh AT iem.uni-
due.de>wrote:
> > Dear Amit,
> >
> > On Wednesday 09 November 2011, you wrote:
> > >> I tried to run
> > >> ./combined_server_1toM
> > >> and
> > >> ./terminal 2001:db8:0:f101::2:7 also I tried ./terminal
> > >> 2001:db8:0:f101::2:19
> > >> however I am getting the same error i.e. Input/Output Error. (I am
> > >> not
> > >> getting this error when I used Pv4 address)
> > >>
> > >> Could you please tell am I missing something or is it some issue
> > >> with
> >
> > the
> >
> > >> machine that I am using.
> > >
> > >Are you running combined_server_1toM and terminal on different
> > >machines?
> > >Otherwise, you get ABORTs due to OOTB handling.
> >
> > I am running the two on the same machine.
> >
> > >Please could you send me a pcap trace of the communications (the IPv4
> >
> > trial
> >
> > >and the IPv6 trial)?
> >
> > Please find attached the pcap files for both IPv4 and IPv6 in the
> > attached
> zip file.
>
> I am getting the following ouput on console on running the terminal.
>
> SCTP Terminal - Version 1.0
> ===========================
>
> Remote = 2001:db8:0:f101::1:7
>
> Connecting ...
> Unable to connect to server: Input/output error


Best regards
--
=======================================================================
Dr. Thomas Dreibholz

University of Duisburg-Essen, Room ES210
Inst. for Experimental Mathematics Ellernstraße 29
Computer Networking Technology Group D-45326 Essen/Germany
-----------------------------------------------------------------------
E-Mail:
dreibh AT iem.uni-due.de
Homepage: http://www.iem.uni-due.de/~dreibh
=======================================================================
Index: distribution.c
===================================================================
--- distribution.c	(Revision 2484)
+++ distribution.c	(Arbeitskopie)
@@ -842,7 +842,6 @@
                    union sockunion * dest_addr)
 {
     SCTP_message *message;
-    SCTP_simple_chunk *chunk = NULL;
     SCTP_init_fixed *initChunk = NULL;
     guchar* initPtr = NULL;
     guchar source_addr_string[SCTP_MAX_IP_LEN];
@@ -918,7 +917,7 @@
 
     } else
 #ifdef HAVE_IPV6
-            if (sockunion_family(dest_addr) == AF_INET6) {
+    if (sockunion_family(dest_addr) == AF_INET6) {
         addressType = SUPPORT_ADDRESS_TYPE_IPV6;
         event_log(VERBOSE, "mdi_receiveMessage: checking for correct IPV6 addresses");
 #if defined (LINUX)
@@ -929,10 +928,11 @@
         if (IN6_IS_ADDR_UNSPECIFIED(&(source_addr->sin6.sin6_addr.s6_addr))) discard = TRUE;
         if (IN6_IS_ADDR_MULTICAST(&(source_addr->sin6.sin6_addr.s6_addr))) discard = TRUE;
         /*  if (IN6_IS_ADDR_V4COMPAT(&(source_addr->sin6.sin6_addr.s6_addr))) discard = TRUE; */
-        if (
-            (!IN6_IS_ADDR_LOOPBACK(&(source_addr->sin6.sin6_addr.s6_addr))) &&
+        /*
+        if ((!IN6_IS_ADDR_LOOPBACK(&(source_addr->sin6.sin6_addr.s6_addr))) &&
             IN6_ARE_ADDR_EQUAL(&(source_addr->sin6.sin6_addr.s6_addr),
-                                &(dest_addr->sin6.sin6_addr.s6_addr))) discard = TRUE;
+                               &(dest_addr->sin6.sin6_addr.s6_addr))) discard = TRUE;
+        */
 #else
         if (IN6_IS_ADDR_UNSPECIFIED(&(dest_addr->sin6.sin6_addr))) discard = TRUE;
         if (IN6_IS_ADDR_MULTICAST(&(dest_addr->sin6.sin6_addr))) discard = TRUE;
@@ -941,15 +941,15 @@
         if (IN6_IS_ADDR_UNSPECIFIED(&(source_addr->sin6.sin6_addr))) discard = TRUE;
         if (IN6_IS_ADDR_MULTICAST(&(source_addr->sin6.sin6_addr))) discard = TRUE;
         /* if (IN6_IS_ADDR_V4COMPAT(&(source_addr->sin6.sin6_addr))) discard = TRUE; */
-        if (
-            (!IN6_IS_ADDR_LOOPBACK(&(source_addr->sin6.sin6_addr))) &&
-            IN6_ARE_ADDR_EQUAL(&(source_addr->sin6.sin6_addr),
+        /*
+        if ((!IN6_IS_ADDR_LOOPBACK(&(source_addr->sin6.sin6_addr))) &&
+             IN6_ARE_ADDR_EQUAL(&(source_addr->sin6.sin6_addr),
                                 &(dest_addr->sin6.sin6_addr))) discard = TRUE;
-
+        */
 #endif
     } else
 #endif
-            {
+    {
         error_log(ERROR_FATAL, "mdi_receiveMessage: Unsupported AddressType Received !");
         discard = TRUE;
     }
@@ -967,7 +967,8 @@
         lastDestPort = 0;
         sctpInstance = NULL;
         currentAssociation = NULL;
-        event_log(INTERNAL_EVENT_0, "mdi_receiveMessage: discarding packet for incorrect addresses");
+        event_logi(INTERNAL_EVENT_0, "mdi_receiveMessage: discarding packet for incorrect address %s",
+                   dest_addr_string);
         return;
     }
 
@@ -1022,8 +1023,6 @@
 
     lastInitiateTag = ntohl(message->common_header.verification_tag);
 
-    chunk = (SCTP_simple_chunk *) & message->sctp_pdu[0];
-
     chunkArray = rbu_scanPDU(message->sctp_pdu, len);
 
 

Attachment: signature.asc
Description: This is a digitally signed message part.



  • Re: [SCTP-Discussion] ext_sendto() failing with "Error 5: Input/Output Error" on IPv6, Thomas Dreibholz, 12/14/2011

Archive powered by MHonArc 2.6.19+.

Top of page