Source-Changes-HG archive

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

[src/trunk]: src/sys/net Make this respect down interfaces.



details:   https://anonhg.NetBSD.org/src/rev/7501035049cc
branches:  trunk
changeset: 518071:7501035049cc
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Nov 24 00:21:27 2001 +0000

description:
Make this respect down interfaces.

diffstat:

 sys/net/if_gre.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 8d1eaac215c2 -r 7501035049cc sys/net/if_gre.c
--- a/sys/net/if_gre.c  Sat Nov 24 00:11:00 2001 +0000
+++ b/sys/net/if_gre.c  Sat Nov 24 00:21:27 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_gre.c,v 1.23 2001/11/13 00:49:35 lukem Exp $ */
+/*     $NetBSD: if_gre.c,v 1.24 2001/11/24 00:21:27 martin Exp $ */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.23 2001/11/13 00:49:35 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.24 2001/11/24 00:21:27 martin Exp $");
 
 #include "opt_inet.h"
 #include "opt_ns.h"
@@ -193,6 +193,9 @@
        u_short etype = 0;
        struct mobile_h mob_h;
 
+       if ((ifp->if_flags & IFF_UP) == 0)
+               return ENETDOWN;
+
        gh = NULL;
        inp = NULL;
        osrc = 0;



Home | Main Index | Thread Index | Old Index