Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/net/lib Don't call loopinit() here. Instead panic i...
details: https://anonhg.NetBSD.org/src/rev/f061ca6991a1
branches: trunk
changeset: 347091:f061ca6991a1
user: christos <christos%NetBSD.org@localhost>
date: Sat Aug 13 11:19:35 2016 +0000
description:
Don't call loopinit() here. Instead panic if -lrumpnet_net has not been
called to initialize lo0ifp.
diffstat:
sys/rump/net/lib/libnetinet/netinet_component.c | 8 +++++---
sys/rump/net/lib/libnetinet6/netinet6_component.c | 8 ++++----
2 files changed, 9 insertions(+), 7 deletions(-)
diffs (69 lines):
diff -r 33d46eb1f5a7 -r f061ca6991a1 sys/rump/net/lib/libnetinet/netinet_component.c
--- a/sys/rump/net/lib/libnetinet/netinet_component.c Sat Aug 13 08:09:17 2016 +0000
+++ b/sys/rump/net/lib/libnetinet/netinet_component.c Sat Aug 13 11:19:35 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netinet_component.c,v 1.6 2016/08/12 11:43:04 christos Exp $ */
+/* $NetBSD: netinet_component.c,v 1.7 2016/08/13 11:19:35 christos Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netinet_component.c,v 1.6 2016/08/12 11:43:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netinet_component.c,v 1.7 2016/08/13 11:19:35 christos Exp $");
#include <sys/param.h>
#include <sys/domain.h>
@@ -54,7 +54,6 @@
domain_attach(&arpdomain);
domain_attach(&inetdomain);
- loopinit();
carpattach(1);
rump_netisr_register(NETISR_ARP, arpintr);
@@ -67,6 +66,9 @@
struct socket *so;
int error;
+ if (lo0ifp == NULL)
+ panic("lo0 config: rumpnet_net has not been initialized");
+
if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0, curlwp, NULL)) != 0)
panic("lo0 config: cannot create socket");
diff -r 33d46eb1f5a7 -r f061ca6991a1 sys/rump/net/lib/libnetinet6/netinet6_component.c
--- a/sys/rump/net/lib/libnetinet6/netinet6_component.c Sat Aug 13 08:09:17 2016 +0000
+++ b/sys/rump/net/lib/libnetinet6/netinet6_component.c Sat Aug 13 11:19:35 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netinet6_component.c,v 1.5 2016/08/12 11:43:04 christos Exp $ */
+/* $NetBSD: netinet6_component.c,v 1.6 2016/08/13 11:19:35 christos Exp $ */
/*
* Copyright (c) 2013 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netinet6_component.c,v 1.5 2016/08/12 11:43:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netinet6_component.c,v 1.6 2016/08/13 11:19:35 christos Exp $");
#include <sys/param.h>
#include <sys/domain.h>
@@ -48,12 +48,12 @@
extern struct domain inet6domain;
domain_attach(&inet6domain);
-
- loopinit();
}
RUMP_COMPONENT(RUMP_COMPONENT_NET_IFCFG)
{
+ if (lo0ifp == NULL)
+ panic("lo0 config: rumpnet_net has not been initialized");
if_up(lo0ifp);
}
Home |
Main Index |
Thread Index |
Old Index