Module Name: src Committed By: kre Date: Wed Aug 10 10:09:42 UTC 2016
Modified Files: src/sys/net: if.h if_loop.c src/sys/rump/net/lib/libnet: net_component.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.224 -r1.225 src/sys/net/if.h cvs rdiff -u -r1.90 -r1.91 src/sys/net/if_loop.c cvs rdiff -u -r1.5 -r1.6 src/sys/rump/net/lib/libnet/net_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.224 src/sys/net/if.h:1.225 --- src/sys/net/if.h:1.224 Mon Aug 1 03:15:30 2016 +++ src/sys/net/if.h Wed Aug 10 10:09:42 2016 @@ -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 ifq_enqueue2(struct ifnet *, struct 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 *); Index: src/sys/net/if_loop.c diff -u src/sys/net/if_loop.c:1.90 src/sys/net/if_loop.c:1.91 --- src/sys/net/if_loop.c:1.90 Sun Aug 7 17:38:34 2016 +++ src/sys/net/if_loop.c Wed Aug 10 10:09:42 2016 @@ -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 @@ loopattach(int n) */ } -static void +void loopinit(void) { Index: src/sys/rump/net/lib/libnet/net_component.c diff -u src/sys/rump/net/lib/libnet/net_component.c:1.5 src/sys/rump/net/lib/libnet/net_component.c:1.6 --- src/sys/rump/net/lib/libnet/net_component.c:1.5 Tue Jan 26 23:12:18 2016 +++ src/sys/rump/net/lib/libnet/net_component.c Wed Aug 10 10:09:42 2016 @@ -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_ROUTE) RUMP_COMPONENT(RUMP_COMPONENT_NET_IF) { - loopattach(1); + loopinit(); }