summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* LSM: Make the Labeled IPsec hooks more stack friendlyPaul Moore2008-04-123-37/+43
| | | | | | | | | | | | The xfrm_get_policy() and xfrm_add_pol_expire() put some rather large structs on the stack to work around the LSM API. This patch attempts to fix that problem by changing the LSM API to require only the relevant "security" pointers instead of the entire SPD entry; we do this for all of the security_xfrm_policy*() functions to keep things consistent. Signed-off-by: Paul Moore <paul.moore@hp.com> Acked-by: James Morris <jmorris@namei.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [AF_UNIX]: Use SEQ_START_TOKENJoe Perches2008-04-121-3/+3
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Remove an unused parameter from sctp_cmd_hb_timer_updateGui Jianfeng2008-04-121-2/+1
| | | | | | | | | The 'asoc' parameter to sctp_cmd_hb_timer_update() is unused, and we can remove it. Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: "list_for_each()" -> "list_for_each_entry()" where appropriate.Robert P. J. Day2008-04-128-134/+69
| | | | | | | | | | Replacing (almost) all invocations of list_for_each() with list_for_each_entry() tightens up the code and allows for the deletion of numerous list iterator variables that are no longer necessary. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Correct /proc/net/assocs formatting errorNeil Horman2008-04-121-7/+7
| | | | | | | | | | | | Recently I posted a patch to add some informational items to /proc/net/sctp/assocs. All the information is correct, but because of how the seqfile show operation is laid out, some of the formatting is backwards. This patch corrects that formatting, so that the new information appears at the end of each line, rather than in the middle. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* IPV4: use xor rather than multiple ands for route compareStephen Hemminger2008-04-101-5/+5
| | | | | | | | | | | The comparison in ip_route_input is a hot path, by recoding the C "and" as bit operations, fewer conditional branches get generated so the code should be faster. Maybe someday Gcc will be smart enough to do this? Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCTP]: Use snmp_mib_{init,free}().YOSHIFUJI Hideaki2008-04-101-14/+4
| | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [DCCP]: Use snmp_mib_{init,free}().YOSHIFUJI Hideaki2008-04-101-23/+4
| | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv4: fib_trie leaf free optimizationStephen Hemminger2008-04-101-8/+11
| | | | | | | | | Avoid unneeded test in the case where object to be freed has to be a leaf. Don't need to use the generic tnode_free() function, instead just setup leaf to be freed. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv4: fib_trie remove unused argumentStephen Hemminger2008-04-101-4/+4
| | | | | | | | The trie pointer is passed down to flush_list and flush_leaf but never used. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ATM]: Use SEQ_START_TOKENJoe Perches2008-04-103-14/+15
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [Syncookies]: Add support for TCP options via timestamps.Florian Westphal2008-04-105-16/+109
| | | | | | | | | | | | | | | | | | | | | | | | | Allow the use of SACK and window scaling when syncookies are used and the client supports tcp timestamps. Options are encoded into the timestamp sent in the syn-ack and restored from the timestamp echo when the ack is received. Based on earlier work by Glenn Griffin. This patch avoids increasing the size of structs by encoding TCP options into the least significant bits of the timestamp and by not using any 'timestamp offset'. The downside is that the timestamp sent in the packet after the synack will increase by several seconds. changes since v1: don't duplicate timestamp echo decoding function, put it into ipv4/syncookie.c and have ipv6/syncookies.c use it. Feedback from Glenn Griffin: fix line indented with spaces, kill redundant if () Reviewed-by: Hagen Paul Pfeifer <hagen@jauu.net> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* IPV4: fib_trie use vmalloc for large tnodesStephen Hemminger2008-04-101-10/+15
| | | | | | | | | | | | | | | Use vmalloc rather than alloc_pages to avoid wasting memory. The problem is that tnode structure has a power of 2 sized array, plus a header. So the current code wastes almost half the memory allocated because it always needs the next bigger size to hold that small header. This is similar to an earlier patch by Eric, but instead of a list and lock, I used a workqueue to handle the fact that vfree can't be done in interrupt context. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* iucv: Delay bus registration until core is ready.Cornelia Huck2008-04-101-7/+9
| | | | | | | | | | | If we register the iucv bus after the infrastructure is ready, userspace can start relying on it when it receives the uevent for the bus. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* iucv: get rid of in_atomic() use.Heiko Carstens2008-04-101-1/+0
| | | | | | | | | This BUG_ON is not needed, since all (debug) checks are also done in smp_call_function() which gets called by this function. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* af_iucv: Use non-deprecated __RW_LOCK_UNLOCKED macro.Robert P. J. Day2008-04-101-1/+1
| | | | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SKFILTER]: Add SKF_ADF_NLATTR instructionPatrick McHardy2008-04-101-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SKF_ADF_NLATTR searches for a netlink attribute, which avoids manually parsing and walking attributes. It takes the offset at which to start searching in the 'A' register and the attribute type in the 'X' register and returns the offset in the 'A' register. When the attribute is not found it returns zero. A top-level attribute can be located using a filter like this (example for nfnetlink, using struct nfgenmsg): ... { /* A = offset of first attribute */ .code = BPF_LD | BPF_IMM, .k = sizeof(struct nlmsghdr) + sizeof(struct nfgenmsg) }, { /* X = CTA_PROTOINFO */ .code = BPF_LDX | BPF_IMM, .k = CTA_PROTOINFO, }, { /* A = netlink attribute offset */ .code = BPF_LD | BPF_B | BPF_ABS, .k = SKF_AD_OFF + SKF_AD_NLATTR }, { /* Exit if not found */ .code = BPF_JMP | BPF_JEQ | BPF_K, .k = 0, .jt = <error> }, ... A nested attribute below the CTA_PROTOINFO attribute would then be parsed like this: ... { /* A += sizeof(struct nlattr) */ .code = BPF_ALU | BPF_ADD | BPF_K, .k = sizeof(struct nlattr), }, { /* X = CTA_PROTOINFO_TCP */ .code = BPF_LDX | BPF_IMM, .k = CTA_PROTOINFO_TCP, }, { /* A = netlink attribute offset */ .code = BPF_LD | BPF_B | BPF_ABS, .k = SKF_AD_OFF + SKF_AD_NLATTR }, ... The data of an attribute can be loaded into 'A' like this: ... { /* X = A (attribute offset) */ .code = BPF_MISC | BPF_TAX, }, { /* A = skb->data[X + k] */ .code = BPF_LD | BPF_B | BPF_IND, .k = sizeof(struct nlattr), }, ... Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* SCTP: Remove useless assignment from __sctp_rcv_lookup_endpointGui Jianfeng2008-04-101-1/+0
| | | | | Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* SCTP: fix wrong debug counting of bind_bucketLi Zefan2008-04-101-1/+1
| | | | | | | | Should not count it if the allocation of the object is failed. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* SCTP: fix wrong debug counting of datamsgLi Zefan2008-04-101-2/+3
| | | | | | | | Should not count it if the allocation of this object failed. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* IPV4: route rekey timer can be deferrableStephen Hemminger2008-04-101-1/+3
| | | | | | | No urgency on the rehash interval timer, so mark it as deferrable. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* IPV4: route use jhash3Stephen Hemminger2008-04-101-6/+4
| | | | | | | | Since route hash is a triple, use jhash_3words rather doing the mixing directly. This should be as fast and give better distribution. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* IPV4: route inline changesStephen Hemminger2008-04-101-27/+27
| | | | | | | | Don't mark functions that are large as inline, let compiler decide. Also, use inline rather than __inline__. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* socket: sk_filter deinlineStephen Hemminger2008-04-101-0/+35
| | | | | | | | The sk_filter function is too big to be inlined. This saves 2296 bytes of text on allyesconfig. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* socket: sk_filter minor cleanupsStephen Hemminger2008-04-101-3/+2
| | | | | | | | | | | Some minor style cleanups: * Move __KERNEL__ definitions to one place in filter.h * Use const for sk_filter_len * Line wrapping * Put EXPORT_SYMBOL next to function definition Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mac80211: fix key debugfs default_key linkJohannes Berg2008-04-082-1/+3
| | | | | | | | The default_key symlink points to the key index rather than they key counter, fix it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: rename filesJohannes Berg2008-04-0827-32/+32
| | | | | | | | This patch renames all mac80211 files (except ieee80211_i.h) to get rid of the useless ieee80211_ prefix. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix key vs. sta locking problemsJohannes Berg2008-04-0811-229/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up to now, key manipulation is supposed to run under RTNL to avoid concurrent manipulations and also allow the set_key() hardware callback to sleep. This is not feasible because STA structs are rcu-protected and thus a lot of operations there cannot take the RTNL. Also, key references are rcu-protected so we cannot do things atomically. This patch changes key locking completely: * key operations are now atomic * hardware crypto offload is enabled and disabled from a workqueue, due to that key freeing is also delayed * debugfs code is also run from a workqueue * keys reference STAs (and vice versa!) so during STA unlink the STAs key reference is removed but not the keys STA reference, to avoid races key todo work is run before STA destruction. * fewer STA operations now need the RTNL which was required due to key operations This fixes the locking problems lockdep pointed out and also makes things more light-weight because the rtnl isn't required as much. Note that the key todo lock/key mutex are global locks, this is not required, of course, they could be per-hardware instead. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix sta-info pinningJohannes Berg2008-04-081-32/+32
| | | | | | | | | | When a STA is supposed to be unlinked but is pinned, it still needs to be unlinked from all structures. Only at the end of the unlink process should we check for pin status and invalidate the callers reference if it is pinned. Move the pin status check down. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix defined but not usedJiri Slaby2008-04-081-30/+30
| | | | | | | | | | | | | These two symbols are used only in ifdeffed function. Move them to that section too. net/mac80211/sta_info.c:387: warning: `__sta_info_pin' defined but not used net/mac80211/sta_info.c:397: warning: `__sta_info_unpin' defined but not used Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Michael Wu <flamingice@sourmilk.net> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Jiri Benc <jbenc@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: BA session debug prints changesRon Rindjunsky2008-04-082-12/+16
| | | | | | | | | | | | This patch contains next issues: 1 - prevents "stop BA session" multiple warnings 2 - adds debug print to stop Rx BA session flow 3 - adds EOL in one debug print Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: notify mac from low level driver (iwlwifi)Mohamed Abbas2008-04-081-0/+23
| | | | | | | | | | Add new API to MAC80211 to allow low level driver to notify MAC with driver status. Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix ieee80211_ioctl_giwrateJohannes Berg2008-04-081-6/+12
| | | | | | | | The ieee80211_ioctl_giwrate() ioctl handler doesn't rcu_read_lock() its access to the sta table, fix it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: make debugfs files root-onlyJohannes Berg2008-04-083-6/+6
| | | | | | | | | | | | | | | Unfortunately, debugfs can be made to access invalid memory by open()ing a file and then waiting until the corresponding debugfs file has been removed (and, probably, the underlying object.) That could be exploited by any user if the user is able to open debugfs files and can cause networking devices, STA entries or similar to disappear which is quite easy to do. Hence, all debugfs files should be root-only. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: notify upper layers after lowerReinette Chatre2008-04-081-2/+2
| | | | | | | | | | | | | When drivers receive change notification they may do work that will enable the changes to take effect. For example, if new association the device needs to be programmed with this information. Give the driver chance to make the changes before notifying the upper layer - thus preventing race condition where upper layer attempts to utilize state that may not be configured yet. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: default to regulatory max power for channelJohn W. Linville2008-04-081-1/+4
| | | | | | | If the driver does not specify a maximum power output, default to the regulatory max. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: clean up IEEE80211_FC useJohannes Berg2008-04-084-10/+2
| | | | | | | | | | | Really doesn't need to be defined four times. Also, while at it, remove a useless macro (IEEE80211_ALIGN32_PAD) and a function prototype for a function we don't actually have (ieee80211_set_compression.) Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix possible sta-debugfs work lockupJohannes Berg2008-04-081-6/+23
| | | | | | | | | | | | | | | | | | | | Because we queue the sta-debugfs-adding work on our mac80211 workqueue (which needs to be flushed under RTNL) and that work needs the RTNL, it can currently deadlock, thanks to Reinette Chatre for pointing out the lockdep warning about this. This patch fixes it by moving this work to the common kernel workqueue (using schedule_work) and canceling it as appropriate. It also fixes a related problem: When a STA is pinned by the debugfs adding work and sta_info_flush() runs concurrently it is not guaranteed that all STAs are removed from the driver before the corresponding interface is removed which may lead to bugs. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: add station aid into ieee80211_tx_controlChr2008-04-081-0/+1
| | | | | | | | This patch is necessary for the upcoming Accesspoint patch for p54. Signed-off-by: Christian Lamparter <chunkeey@web.de> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: add association capabilty and timing info into bss_confTomas Winkler2008-04-081-1/+8
| | | | | | | | | This patch adds assocation capability, timestamp (tsf) and beacon interval to bss_conf. This is required for successful assocation of iwlwifi drivers Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: eliminate conf_htTomas Winkler2008-04-083-46/+66
| | | | | | | | | This patch eliminates the use of conf_ht, replacing it with bss_info_changed. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Revert "mac80211: use a struct for bss->mesh_config"John W. Linville2008-04-084-41/+18
| | | | | | | | | | | | This reverts commit 6c4711b4697d93424e4b1f76a9929ba844d714a5. That patch breaks mesh config comparison between beacons/probe reponses, so every beacon from a mesh network would be added as a new bss. Since the comparison has to be performed for every received beacon I believe it is best to save the mesh config in a format easy to compare, rather than do a bunch of unaligned accesses to compare field by field. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'net-2.6.26-isatap-20080403' of ↵David S. Miller2008-04-086-71/+284
|\ | | | | | | git://git.linux-ipv6.org/gitroot/yoshfuji/linux-2.6-dev
| * [IPV6] NDISC: Don't rely on node-type hint from L2 unless required.YOSHIFUJI Hideaki2008-04-032-0/+14
| | | | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * [IPV6]: Unify ip6_onlink() and ipip6_onlink().YOSHIFUJI Hideaki2008-04-033-50/+27
| | | | | | | | | | Both are identical, let's create ipv6_chk_prefix() and use it in both places.
| * [IPV6] NDISC: Ignore route information with /0 prefix from interior router.YOSHIFUJI Hideaki2008-04-031-1/+7
| | | | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * [IPV6] SIT: Add SIOCGETPRL ioctl to get/dump PRL.YOSHIFUJI Hideaki2008-04-031-9/+87
| | | | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * [IPV6] SIT: Disallow 0.0.0.0 in PRL and Flush PRL if given for DEL.YOSHIFUJI Hideaki2008-04-031-1/+4
| | | | | | | | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * [IPV6] SIT: Fix locking issues in PRL management.YOSHIFUJI Hideaki2008-04-031-17/+32
| | | | | | | | | | | | To protect PRL list, use ipip6_lock. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
| * [IPV6] SIT: Add PRL management for ISATAP.Templin, Fred L2008-04-033-46/+166
| | | | | | | | | | | | | | | | | | | | | | | | This patch updates the Linux the Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) implementation. It places the ISATAP potential router list (PRL) in the kernel and adds three new private ioctls for PRL management. [Add several changes of structure name, constant names etc. - yoshfuji] Signed-off-by: Fred L. Templin <fred.l.templin@boeing.com> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
OpenPOWER on IntegriCloud