From a62b5c1e2e75b543f05039169e95e682242a8ad2 Mon Sep 17 00:00:00 2001 From: onoe Date: Mon, 28 May 2001 00:46:35 +0000 Subject: [PATCH] add a comment why IFF_PROMISC is handled separately for SIOCSIFFLAGS: Handle special case for IFF_PROMISC. If only IFF_PROMISC flag is changed, do not call an_init() to avoid initiating reassociation to another access point. It is really helpful for tcpdump(8). --- sys/dev/ic/an.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index b246a6a04107..6c90df03d8a8 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $NetBSD: an.c,v 1.13 2001/05/24 08:12:28 itojun Exp $ */ +/* $NetBSD: an.c,v 1.14 2001/05/28 00:46:35 onoe Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. @@ -1040,6 +1040,12 @@ static int an_ioctl(ifp, command, data) switch (command) { case SIOCSIFFLAGS: + /* + * Handle special case for IFF_PROMISC. If only IFF_PROMISC + * flag is changed, do not call an_init() to avoid initiating + * reassociation to another access point. It is really + * helpful for tcpdump(8). + */ if ((ifp->if_flags & sc->an_if_flags & (IFF_UP | IFF_RUNNING)) == (IFF_UP | IFF_RUNNING)) { if (ifp->if_flags & IFF_PROMISC &&