Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ipv6 broken in -current



Hey,

Markus W Kilbinger wrote:
Hi!

Since at least yesterday my actual -current systems (cobalt, amd64;
-current kernel and userland, tried it with sources from yesterday and
today) both show general ipv6 problems:

Though ipv6 configured as before ipv6 connectivity seems broken, e.
g.:

  $ ssh ::1
  ssh: connect to host ::1 port 22: Address already in use

though 'someone' is listening:

  $ netstat -af inet6
  Active Internet6 connections (including servers)
  Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
  tcp6       0      0  *.ident                *.*                    LISTEN
  tcp6       0      0  *.finger               *.*                    LISTEN
  tcp6       0      0  *.exec                 *.*                    LISTEN
  tcp6       0      0  *.login                *.*                    LISTEN
  tcp6       0      0  *.shell                *.*                    LISTEN
  tcp6       0      0  *.telnet               *.*                    LISTEN
  tcp6       0      0  *.ftp                  *.*                    LISTEN
  tcp6       0      0  *.ssh                  *.*                    LISTEN
  tcp6       0      0  *.shilp                *.*                    LISTEN
  tcp6       0      0  *.*                    *.*                    CLOSED
  tcp6       0      0  *.sunrpc               *.*                    LISTEN
udp6 0 0 fe80::1%lo0.ntp *.* [...]

At boot time several processes complain about:

  mountd[233]: Cannot bind to reserved port 0 (Address already in use)

Does anybody else see this problem?

Can you please try the attached diff?

-e.


Index: in6_pcb.c
===================================================================
RCS file: /cvsroot/src/sys/netinet6/in6_pcb.c,v
retrieving revision 1.105
diff -u -p -r1.105 in6_pcb.c
--- in6_pcb.c   20 Apr 2009 19:57:18 -0000      1.105
+++ in6_pcb.c   22 Apr 2009 12:49:58 -0000
@@ -298,27 +298,29 @@ in6_pcbbind_port(struct in6pcb *in6p, st
                        reuseport = SO_REUSEADDR|SO_REUSEPORT;
        }
 
-       if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
+       if (sin6->sin6_port != 0) {
+               if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
 #ifdef INET
-               struct inpcb *t;
+                       struct inpcb *t;
 
-               t = in_pcblookup_port(table,
-                   *(struct in_addr *)&sin6->sin6_addr.s6_addr32[3],
-                   sin6->sin6_port, wild);
-               if (t && (reuseport & t->inp_socket->so_options) == 0)
-                       return (EADDRINUSE);
+                       t = in_pcblookup_port(table,
+                           *(struct in_addr *)&sin6->sin6_addr.s6_addr32[3],
+                           sin6->sin6_port, wild);
+                       if (t && (reuseport & t->inp_socket->so_options) == 0)
+                               return (EADDRINUSE);
 #else
-               return (EADDRNOTAVAIL);
+                       return (EADDRNOTAVAIL);
 #endif
-       }
+               }
 
-       {
-               struct in6pcb *t;
+               {
+                       struct in6pcb *t;
 
-               t = in6_pcblookup_port(table, &sin6->sin6_addr,
-                   sin6->sin6_port, wild);
-               if (t && (reuseport & t->in6p_socket->so_options) == 0)
-                       return (EADDRINUSE);
+                       t = in6_pcblookup_port(table, &sin6->sin6_addr,
+                           sin6->sin6_port, wild);
+                       if (t && (reuseport & t->in6p_socket->so_options) == 0)
+                               return (EADDRINUSE);
+               }
        }
 
        if (sin6->sin6_port == 0) {


Home | Main Index | Thread Index | Old Index