Current-Users archive

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

Re: ipv6 connectivity broken in -current (again)



On Sat, 2 May 2009 09:57:25 +0200
Markus W Kilbinger <mk%kilbi.de@localhost> wrote:

> Since about 2 days -current kernel panic during any kind of ipv6
> connectivity! (Does anybody else see this?)

Crash happens due to attempt to modify "in6_any" (which is .rodata)
at in6_src.c:884:

882 if (t == 0) {
883        /* We have a free port. Check with the secmodel. */
884        sin6->sin6_port = lport;
885        error = kauth_authorize_network(l->l_cred,

Here's a workaround I'm using:

Index: in6_src.c
===================================================================
RCS file: /cvsroot/src/sys/netinet6/in6_src.c,v
retrieving revision 1.47
diff -u -r1.47 in6_src.c
--- in6_src.c   30 Apr 2009 20:26:09 -0000      1.47
+++ in6_src.c   2 May 2009 13:58:48 -0000
@@ -881,9 +881,10 @@
                }
                if (t == 0) {
                        /* We have a free port. Check with the secmodel. */
-                       sin6->sin6_port = lport;
+                       struct sockaddr_in6 tmp = *sin6;
+                       tmp.sin6_port = lport;
                        error = kauth_authorize_network(l->l_cred,
-                           KAUTH_NETWORK_BIND, req, so, sin6, NULL);
+                           KAUTH_NETWORK_BIND, req, so, &tmp, NULL);
                        if (error) {
                                /* Secmodel says no. Keep looking. */
                                continue;


Home | Main Index | Thread Index | Old Index