1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00
freebsd/sys/net80211
Robert Watson 8c0fec805f Modify most routines returning 'struct ifaddr *' to return references
rather than pointers, requiring callers to properly dispose of those
references.  The following routines now return references:

  ifaddr_byindex
  ifa_ifwithaddr
  ifa_ifwithbroadaddr
  ifa_ifwithdstaddr
  ifa_ifwithnet
  ifaof_ifpforaddr
  ifa_ifwithroute
  ifa_ifwithroute_fib
  rt_getifa
  rt_getifa_fib
  IFP_TO_IA
  ip_rtaddr
  in6_ifawithifp
  in6ifa_ifpforlinklocal
  in6ifa_ifpwithaddr
  in6_ifadd
  carp_iamatch6
  ip6_getdstifaddr

Remove unused macro which didn't have required referencing:

  IFP_TO_IA6

This closes many small races in which changes to interface
or address lists while an ifaddr was in use could lead to use of freed
memory (etc).  In a few cases, add missing if_addr_list locking
required to safely acquire references.

Because of a lack of deep copying support, we accept a race in which
an in6_ifaddr pointed to by mbuf tags and extracted with
ip6_getdstifaddr() doesn't hold a reference while in transmit.  Once
we have mbuf tag deep copy support, this can be fixed.

Reviewed by:	bz
Obtained from:	Apple, Inc. (portions)
MFC after:	6 weeks (portions)
2009-06-23 20:19:09 +00:00
..
_ieee80211.h make implicit pad visible 2009-06-11 17:10:21 +00:00
ieee80211_acl.c convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
ieee80211_adhoc.c Fix handling of devices w/o radiotap support: 2009-05-25 16:38:47 +00:00
ieee80211_adhoc.h
ieee80211_amrr.c
ieee80211_amrr.h
ieee80211_crypto_ccmp.c Correct ieee80211_gettid: 2009-06-09 16:32:07 +00:00
ieee80211_crypto_none.c
ieee80211_crypto_tkip.c add tid param to ieee80211_notify_replay_failure to get the correct rsc 2009-06-05 23:10:30 +00:00
ieee80211_crypto_wep.c convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
ieee80211_crypto.c use c99-style initializers 2009-06-07 23:16:10 +00:00
ieee80211_crypto.h add tid param to ieee80211_notify_replay_failure to get the correct rsc 2009-06-05 23:10:30 +00:00
ieee80211_ddb.c After cleaning up rt_tables from vnet.h and cleaning up opt_route.h 2009-06-23 17:03:45 +00:00
ieee80211_dfs.c protect callouts with the com lock 2009-06-09 17:12:19 +00:00
ieee80211_dfs.h Fix definition of IEEE80211_CHAN_MAX; it was defined as 255 but 2008-12-15 01:26:33 +00:00
ieee80211_freebsd.c add tid param to ieee80211_notify_replay_failure to get the correct rsc 2009-06-05 23:10:30 +00:00
ieee80211_freebsd.h Prepare to distribute sysctl code to reduce global definitions: 2009-05-20 20:18:01 +00:00
ieee80211_hostap.c iv_flags_ext is full, make room by moving HT-related flags to a new 2009-06-07 22:00:22 +00:00
ieee80211_hostap.h
ieee80211_ht.c Correct ieee80211_gettid: 2009-06-09 16:32:07 +00:00
ieee80211_ht.h pad data structures to enable integration of future features w/o abi breakage 2009-06-01 16:36:28 +00:00
ieee80211_input.c iv_flags_ext is full, make room by moving HT-related flags to a new 2009-06-07 22:00:22 +00:00
ieee80211_input.h split Atheros SuperG support out into it's own file that's included only 2009-03-24 20:39:08 +00:00
ieee80211_ioctl.c use negotiated short gi to calculate the tx rate; using the htcaps 2009-06-11 17:09:39 +00:00
ieee80211_ioctl.h Rev IEEE80211_IOC_STA_INFO abi: ni_flags grew from 16 bits to 32 2009-06-13 23:43:00 +00:00
ieee80211_monitor.c count packets 2009-06-02 00:04:10 +00:00
ieee80211_monitor.h
ieee80211_node.c When associating to an AP we don't know if HT is negotiated until 2009-06-11 04:43:42 +00:00
ieee80211_node.h When associating to an AP we don't know if HT is negotiated until 2009-06-11 04:43:42 +00:00
ieee80211_output.c do not strip M_MORE_DATA on packets coming through ieee80211_start; 2009-06-08 03:18:45 +00:00
ieee80211_phy.c use 1/2 and 1/4 rate phy types to simplify txtime calculation 2009-02-19 17:44:23 +00:00
ieee80211_phy.h add ieee80211_isratevalid 2009-05-29 23:39:16 +00:00
ieee80211_power.c convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
ieee80211_power.h New ap-side power save implementation; the main change is to allow drivers 2008-10-26 01:04:46 +00:00
ieee80211_proto.c o station mode channel switch support 2009-06-04 15:57:38 +00:00
ieee80211_proto.h Correct ieee80211_gettid: 2009-06-09 16:32:07 +00:00
ieee80211_radiotap.c purge dead code 2009-06-08 21:16:06 +00:00
ieee80211_radiotap.h
ieee80211_regdomain.c Add modes for 1/2 and 1/4-width channels so we have separate roaming 2009-02-19 05:21:54 +00:00
ieee80211_regdomain.h o add country codes from Atheros regulatory; these are not listed in 2009-01-27 23:09:55 +00:00
ieee80211_rssadapt.c
ieee80211_rssadapt.h
ieee80211_scan_sta.c iv_flags_ext is full, make room by moving HT-related flags to a new 2009-06-07 22:00:22 +00:00
ieee80211_scan.c calls callout_drain(9) to un-schedule a scan timer to prevent a page 2009-06-03 04:10:22 +00:00
ieee80211_scan.h o station mode channel switch support 2009-06-04 15:57:38 +00:00
ieee80211_sta.c When associating to an AP we don't know if HT is negotiated until 2009-06-11 04:43:42 +00:00
ieee80211_sta.h
ieee80211_superg.c distribute sysctl decls so global variables can be made static 2009-05-30 20:11:23 +00:00
ieee80211_superg.h make superg/fast-frames state dynamically-allocated (and indirect off 2009-05-02 20:16:55 +00:00
ieee80211_tdma.c o assert TDMA_MAXSLOTS is 2 so noone tries to blindly increase it 2009-05-30 19:57:31 +00:00
ieee80211_tdma.h Overhaul monitor mode handling: 2009-05-20 20:00:40 +00:00
ieee80211_var.h iv_flags_ext is full, make room by moving HT-related flags to a new 2009-06-07 22:00:22 +00:00
ieee80211_wds.c ieee80211_dwds_mcast(): check the correct mbuf ptr after encap. 2009-06-18 21:15:41 +00:00
ieee80211_wds.h
ieee80211_xauth.c
ieee80211.c Modify most routines returning 'struct ifaddr *' to return references 2009-06-23 20:19:09 +00:00
ieee80211.h Correct ieee80211_gettid: 2009-06-09 16:32:07 +00:00