Source-Changes-HG archive

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

[src/trunk]: src/sys On the first day (that being the eighth day of the eight...



details:   https://anonhg.NetBSD.org/src/rev/3e2cab08e490
branches:  trunk
changeset: 347001:3e2cab08e490
user:      kre <kre%NetBSD.org@localhost>
date:      Wed Aug 10 10:09:42 2016 +0000

description:
On the first day (that being the eighth day of the eighth month,) the
building was completed only to discover that within there lay havoc.

On the second day all just groaned and moaned, and it must be someone
else's problen.

On the third day, St. Martin stepped in and traced the culprit, which
provided inspiration, and a correction was made.

Forevermore all were agog at just how such a trivial thing could do
so much damage...


OK...   to be a little less vague.   The loopback interface is a truly
"special" thing, and rump knew that - and treated it very specially.
Unfortunately, when the loopback interface is changed, and rump does
not keep up, bad things happen.

This (overall) might, or might not, be the correct fix - but for now
it appears to work.   If someone, sometime, finds a better way to
deal with the issues of the loopback interfaces true majesty, feel
free to revert this and do it another way.

diffstat:

 sys/net/if.h                            |  3 ++-
 sys/net/if_loop.c                       |  6 +++---
 sys/rump/net/lib/libnet/net_component.c |  6 +++---
 3 files changed, 8 insertions(+), 7 deletions(-)

diffs (69 lines):

diff -r 69b948282926 -r 3e2cab08e490 sys/net/if.h
--- a/sys/net/if.h      Wed Aug 10 07:50:37 2016 +0000
+++ b/sys/net/if.h      Wed Aug 10 10:09:42 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.h,v 1.224 2016/08/01 03:15:30 ozaki-r Exp $ */
+/*     $NetBSD: if.h,v 1.225 2016/08/10 10:09:42 kre Exp $     */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -1021,6 +1021,7 @@
 
 int    loioctl(struct ifnet *, u_long, void *);
 void   loopattach(int);
+void   loopinit(void);
 int    looutput(struct ifnet *,
           struct mbuf *, const struct sockaddr *, const struct rtentry *);
 void   lortrequest(int, struct rtentry *, const struct rt_addrinfo *);
diff -r 69b948282926 -r 3e2cab08e490 sys/net/if_loop.c
--- a/sys/net/if_loop.c Wed Aug 10 07:50:37 2016 +0000
+++ b/sys/net/if_loop.c Wed Aug 10 10:09:42 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_loop.c,v 1.90 2016/08/07 17:38:34 christos Exp $    */
+/*     $NetBSD: if_loop.c,v 1.91 2016/08/10 10:09:42 kre Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.90 2016/08/07 17:38:34 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.91 2016/08/10 10:09:42 kre Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -150,7 +150,7 @@
         */
 }
 
-static void
+void
 loopinit(void)
 {
 
diff -r 69b948282926 -r 3e2cab08e490 sys/rump/net/lib/libnet/net_component.c
--- a/sys/rump/net/lib/libnet/net_component.c   Wed Aug 10 07:50:37 2016 +0000
+++ b/sys/rump/net/lib/libnet/net_component.c   Wed Aug 10 10:09:42 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: net_component.c,v 1.5 2016/01/26 23:12:18 pooka Exp $  */
+/*     $NetBSD: net_component.c,v 1.6 2016/08/10 10:09:42 kre Exp $    */
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: net_component.c,v 1.5 2016/01/26 23:12:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: net_component.c,v 1.6 2016/08/10 10:09:42 kre Exp $");
 
 #include <sys/param.h>
 #include <sys/domain.h>
@@ -65,5 +65,5 @@
 RUMP_COMPONENT(RUMP_COMPONENT_NET_IF)
 {
 
-       loopattach(1);
+       loopinit();
 }



Home | Main Index | Thread Index | Old Index