Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Fix an omission in the gre cloning changes.
details: https://anonhg.NetBSD.org/src/rev/9bc428a62df1
branches: trunk
changeset: 494359:9bc428a62df1
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Jul 05 22:45:25 2000 +0000
description:
Fix an omission in the gre cloning changes.
diffstat:
sys/net/if_gre.c | 4 ++--
sys/net/if_gre.h | 5 +++--
sys/netinet/ip_gre.c | 7 +++----
3 files changed, 8 insertions(+), 8 deletions(-)
diffs (59 lines):
diff -r d7f6613079b9 -r 9bc428a62df1 sys/net/if_gre.c
--- a/sys/net/if_gre.c Wed Jul 05 22:30:05 2000 +0000
+++ b/sys/net/if_gre.c Wed Jul 05 22:45:25 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gre.c,v 1.10 2000/07/05 18:14:13 thorpej Exp $ */
+/* $NetBSD: if_gre.c,v 1.11 2000/07/05 22:45:25 thorpej Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@
correct value */
#define LINK_MASK (IFF_LINK0|IFF_LINK1|IFF_LINK2)
-LIST_HEAD(, gre_softc) gre_softc_list;
+struct gre_softc_head gre_softc_list;
int gre_clone_create __P((struct if_clone *, int));
void gre_clone_destroy __P((struct ifnet *));
diff -r d7f6613079b9 -r 9bc428a62df1 sys/net/if_gre.h
--- a/sys/net/if_gre.h Wed Jul 05 22:30:05 2000 +0000
+++ b/sys/net/if_gre.h Wed Jul 05 22:45:25 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gre.h,v 1.6 2000/07/05 18:14:14 thorpej Exp $ */
+/* $NetBSD: if_gre.h,v 1.7 2000/07/05 22:45:25 thorpej Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -148,7 +148,8 @@
#define GREGPROTO _IOWR('i', 106, struct ifreq)
#ifdef _KERNEL
-extern struct gre_softc gre_softc[];
+LIST_HEAD(gre_softc_head, gre_softc);
+extern struct gre_softc_head gre_softc_list;
int gre_ioctl __P((struct ifnet *, u_long, caddr_t));
int gre_output __P((struct ifnet *, struct mbuf *, struct sockaddr *,
diff -r d7f6613079b9 -r 9bc428a62df1 sys/netinet/ip_gre.c
--- a/sys/netinet/ip_gre.c Wed Jul 05 22:30:05 2000 +0000
+++ b/sys/netinet/ip_gre.c Wed Jul 05 22:45:25 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_gre.c,v 1.10 2000/03/30 13:24:59 augustss Exp $ */
+/* $NetBSD: ip_gre.c,v 1.11 2000/07/05 22:45:26 thorpej Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -303,10 +303,9 @@
{
struct ip *ip = mtod(m, struct ip *);
struct gre_softc *sc;
- int i;
- for (i = 0; i < NGRE; i++) {
- sc = &gre_softc[i];
+ for (sc = LIST_FIRST(&gre_softc_list); sc != NULL;
+ sc = LIST_NEXT(sc, sc_list)) {
if ((sc->g_dst.s_addr == ip->ip_src.s_addr) &&
(sc->g_src.s_addr == ip->ip_dst.s_addr) &&
(sc->g_proto == proto) &&
Home |
Main Index |
Thread Index |
Old Index