Source-Changes-HG archive

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

[src/trunk]: src/sys/net Don't allow IFF_PROMISC to be changed directly by us...



details:   https://anonhg.NetBSD.org/src/rev/b5c5b16e78ee
branches:  trunk
changeset: 494265:b5c5b16e78ee
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Jul 04 19:09:17 2000 +0000

description:
Don't allow IFF_PROMISC to be changed directly by userspace.  It
interferes with the reference counting done by ifpromisc(), and is
essentially impossible to get the semantics correct if we allow this
flag to be directly toggled.

No programs should really be affected by this; IFF_PROMISC is basically
useless without bpf, anyway, and bpf still provides a way to set
promiscuous mode on an interface (which uses ifpromisc()).

diffstat:

 sys/net/if.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 19fd45fc1918 -r b5c5b16e78ee sys/net/if.h
--- a/sys/net/if.h      Tue Jul 04 18:46:49 2000 +0000
+++ b/sys/net/if.h      Tue Jul 04 19:09:17 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.h,v 1.51 2000/07/02 00:20:49 thorpej Exp $  */
+/*     $NetBSD: if.h,v 1.52 2000/07/04 19:09:17 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -288,7 +288,7 @@
 /* flags set internally only: */
 #define        IFF_CANTCHANGE \
        (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\
-           IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI)
+           IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_PROMISC)
 
 /*
  * Some convenience macros used for setting ifi_baudrate.



Home | Main Index | Thread Index | Old Index