From f5f1525321856d675b6108fe761f633045b1702c Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Thu, 27 Mar 2008 18:02:30 +0000 Subject: [PATCH] Add IFF_NEEDSGIANT to IFF_CANTCHANGE, to prevent user-level code from clearing the IFF_NEEDSGIANT flag on Giant-locked interfaces. In particular, wpa_supplicant was doing this on USB interfaces, causing panics when Giant-locked code was then called without Giant. Submitted by: Alexey Popov Reviewed by: rwatson MFC after: 3 days --- sys/net/if.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net/if.h b/sys/net/if.h index 2d1700a1d61f..95566fb9f941 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -163,7 +163,8 @@ struct if_data { /* flags set internally only: */ #define IFF_CANTCHANGE \ (IFF_BROADCAST|IFF_POINTOPOINT|IFF_DRV_RUNNING|IFF_DRV_OACTIVE|\ - IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC) + IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC|\ + IFF_NEEDSGIANT) /* * Values for if_link_state.