summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* netfilter: ebt_nflog: fix Kconfig typoPatrick McHardy2008-07-081-1/+1
| | | | | | | | The help text should refer to nflog instead of ulog. Noticed by Krzysztof Halasa <khc@pm.waw.pl>. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* netfilter: ip6table_filter in netns for realAlexey Dobriyan2008-07-081-9/+22
| | | | | | | | | One still needs to remove checks in nf_hook_slow() and nf_sockopt_find() to test this, though. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* netfilter: nf_conntrack: add allocation flag to nf_conntrack_allocPablo Neira Ayuso2008-07-082-4/+5
| | | | | | | | | ctnetlink does not need to allocate the conntrack entries with GFP_ATOMIC as its code is executed in user context. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* netfilter: Get rid of refrences to no longer existant Fast NAT.Russ Dill2008-07-082-5/+3
| | | | | | | | | | | Get rid of refrences to no longer existant Fast NAT. IP_ROUTE_NAT support was removed in August of 2004, but references to Fast NAT were left in a couple of config options. Signed-off-by: Russ Dill <Russ.Dill@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* netfilter: use correct namespace in ip6table_securityAlexey Dobriyan2008-07-081-3/+3
| | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@parallels.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: fix dev_set_promiscuity() breakagePatrick McHardy2008-07-061-1/+1
| | | | | | | | | Commit dad9b335 (netdevice: Fix promiscuity and allmulti overflow) broke dev_set_promiscuity() by returning on success without reprogramming the device. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-sched: consolidate default fifo qdisc setupPatrick McHardy2008-07-054-82/+50
| | | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-sched: sch_htb: remove write-only qdisc filter_cntPatrick McHardy2008-07-051-7/+0
| | | | | | | | | | The filter_cnt is supposed to count filter references to a class. Since the qdisc can't be the target of a filter, it doesn't need a filter_cnt. In fact the counter is never decreased since cls_api considers a return value of zero a failure and doesn't unbind again. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-sched: sch_htb: remove child and sibling listsPatrick McHardy2008-07-051-14/+7
| | | | | | | | | | Now that the qdisc isn't destroyed in hierarchical order anymore, the only user of the child lists left is htb_parent_last_child(). This can be easily changed to use a counter of children to save a few bytes. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-sched: sch_htb: use dynamic class hash helpersPatrick McHardy2008-07-051-58/+42
| | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-sched: sch_htb: move hash and sibling list removal to htb_deletePatrick McHardy2008-07-051-23/+17
| | | | | | | | | | | | | | | | Hash list removal currently happens twice (once in htb_delete, once in htb_destroy_class), which makes it harder to use the dynamically sized class hash without adding special cases for HTB. The reason is that qdisc destruction destroys classes in hierarchical order, which is not necessary if filters are destroyed in a separate iteration during qdisc destruction. Adjust qdisc destruction to follow the same scheme as other hierarchical qdiscs by first performing a filter destruction pass, then destroying all classes in hash order. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-sched: sch_cbq: use dynamic class hash helpersPatrick McHardy2008-07-051-57/+55
| | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-sched: sch_hfsc: use dynamic class hash helpersPatrick McHardy2008-07-051-41/+40
| | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-sched: add dynamically sized qdisc class hash helpersPatrick McHardy2008-07-051-0/+104
| | | | | | | | | | | | Currently all qdiscs which allow to create classes uses a fixed sized hash table with size 16 to hash the classes. This causes a large bottleneck when using thousands of classes and unbound filters. Add helpers for dynamically sized class hashes to fix this. The following patches will convert the qdiscs to use them. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2008-07-0518-36/+51
|\ | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: Documentation/feature-removal-schedule.txt drivers/net/wan/hdlc_fr.c drivers/net/wireless/iwlwifi/iwl-4965.c drivers/net/wireless/iwlwifi/iwl3945-base.c
| * bridge: fix use-after-free in br_cleanup_bridges()Patrick McHardy2008-07-031-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unregistering a bridge device may cause virtual devices stacked on the bridge, like vlan or macvlan devices, to be unregistered as well. br_cleanup_bridges() uses for_each_netdev_safe() to iterate over all devices during cleanup. This is not enough however, if one of the additionally unregistered devices is next in the list to the bridge device, it will get freed as well and the iteration continues on the freed element. Restart iteration after each bridge device removal from the beginning to fix this, similar to what rtnl_link_unregister() does. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp: fix a size_t < 0 comparison in tcp_read_sockOctavian Purdila2008-07-031-1/+2
| | | | | | | | | | | | | | | | <used> should be of type int (not size_t) since recv_actor can return negative values and it is also used in a < 0 comparison. Signed-off-by: Octavian Purdila <opurdila@ixiacom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * tcp: net/ipv4/tcp.c needs linux/scatterlist.hAndrew Morton2008-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | alpha: net/ipv4/tcp.c: In function 'tcp_calc_md5_hash': net/ipv4/tcp.c:2479: error: implicit declaration of function 'sg_init_table' net/ipv4/tcp.c:2482: error: implicit declaration of function 'sg_set_buf' net/ipv4/tcp.c:2507: error: implicit declaration of function 'sg_mark_end' Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: fib_rules: fix error code for unsupported familiesPatrick McHardy2008-07-011-2/+2
| | | | | | | | | | | | | | | | | | The errno code returned must be negative. Fixes "RTNETLINK answers: Unknown error 18446744073709551519". Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * netdevice: Fix wrong string handle in kernel command line parsingWang Chen2008-07-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v1->v2: Use strlcpy() to ensure s[i].name be null-termination. 1. In netdev_boot_setup_add(), a long name will leak. ex. : dev=21,0x1234,0x1234,0x2345,eth123456789verylongname......... 2. In netdev_boot_setup_check(), mismatch will happen if s[i].name is a substring of dev->name. ex. : dev=...eth1 dev=...eth11 [ With feedback from Ben Hutchings. ] Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: Tyop of sk_filter() commentWang Chen2008-07-011-1/+0
| | | | | | | | | | | | | | Parameter "needlock" no long exists. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * netlink: Unneeded local variableWang Chen2008-07-011-1/+1
| | | | | | | | | | | | | | We already have a variable, which has the same capability. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net-sched: fix filter destruction in atm/hfsc qdisc destructionPatrick McHardy2008-07-012-1/+7
| | | | | | | | | | | | | | | | | | Filters need to be destroyed before beginning to destroy classes since the destination class needs to still be alive to unbind the filter. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net-sched: change tcf_destroy_chain() to clear start of filter listPatrick McHardy2008-07-0110-20/+16
| | | | | | | | | | | | | | | | Pass double tcf_proto pointers to tcf_destroy_chain() to make it clear the start of the filter list for more consistency. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * Merge branch 'master' of ↵David S. Miller2008-06-301-0/+7
| |\ | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
| | * mac80211: don't accept WEP keys other than WEP40 and WEP104Emmanuel Grumbach2008-06-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes mac80211 refuse a WEP key whose length is not WEP40 nor WEP104. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | netfilter: nf_conntrack_tcp: fixing to check the lower bound of valid ACKJozsef Kadlecsik2008-06-301-6/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lost connections was reported by Thomas Bätzler (running 2.6.25 kernel) on the netfilter mailing list (see the thread "Weird nat/conntrack Problem with PASV FTP upload"). He provided tcpdump recordings which helped to find a long lingering bug in conntrack. In TCP connection tracking, checking the lower bound of valid ACK could lead to mark valid packets as INVALID because: - We have got a "higher or equal" inequality, but the test checked the "higher" condition only; fixed. - If the packet contains a SACK option, it could occur that the ACK value was before the left edge of our (S)ACK "window": if a previous packet from the other party intersected the right edge of the window of the receiver, we could move forward the window parameters beyond accepting a valid ack. Therefore in this patch we check the rightmost SACK edge instead of the ACK value in the lower bound of valid (S)ACK test. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2008-07-0515-569/+423
|\ \ | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-next-2.6
| * | mac80211: rework debug settings and make debugging saferJohannes Berg2008-07-0211-342/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reworks the mac80211 debug settings making them more focused and adding help text for those that didn't have one. It also removes a number of printks that can be triggered remotely and add no value, e.g. "too short deauthentication frame received - ignoring". If somebody really needs to debug that they should just add a monitor interface and look at the frames in wireshark. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | mac80211: get rid of function pointers in RX pathJohannes Berg2008-07-021-53/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the RX path to no longer use function pointers for RX handlers but rather invoke them directly. If debugging is enabled, mark the RX handlers noinline because otherwise they all get inlined into ieee80211_invoke_rx_handlers() which makes it harder to see where a bug is. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | mac80211: get rid of function pointers in TX pathJohannes Berg2008-07-022-34/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the TX path to no longer use function pointers for TX handlers but rather invoke them directly. If debugging is enabled, mark the TX handlers noinline because otherwise they all get inlined into invoke_tx_handlers() which makes it harder to see where a bug is. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | mac80211: add beacon timestamp to beacon template in IBSSAssaf Krauss2008-06-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a beacon timestamp to the beacon template used in IBSS mode. This way the underlying driver can update its TSF accordingly. According the spec station should adopt the highest TSF from an incoming beacons in the cell. Signed-off-by: Assaf Krauss <assaf.krauss@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | mac80211: fix warning: unused variable invoke_tx_handlersTomas Winkler2008-06-301-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes warning: unused variable in invoke_tx_handlers when compiling without MAC80211_DEBUG option Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | mac80211: removing duplicated parsing of information elementsEster Kummer2008-06-301-91/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the duplicated parsing of information elements in ieee80211_rx_bss_info and in ieee_rx_mgmt_beacon Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Ester Kummer <ester.kummer@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | build algorithms into the mac80211 moduleAdrian Bunk2008-06-305-50/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old infrastructure was: - the default algorithm is built into mac80211 - other algorithms get into their own modules The implementation of this complicated scheme was horrible (just look at net/mac80211/Makefile), and anyone adding a new algorithm would most likely not get it right at his first attempt. This patch therefore builds all enabled algorithms into the mac80211 module. The user interface for the rate control algorithms changes as follows: - first the user can choose which algorithms to enable (currently only MAC80211_RC_PID is available) - if more than one algorithm is enabled (currently not possible since only one algorithm is present) the user then chooses the default one Note: - MAC80211_RC_PID is always enables for CONFIG_EMBEDDED=n Technical changes: - all selected algorithms get into the mac80211 module - net/mac80211/Makefile can now become much less complicated - support for rc80211_pid_algo.c being modular is no longer required - this includes unexporting mesh_plink_broken Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | mac80211: add last beacon time in scan listEmmanuel Grumbach2008-06-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the interval between the scan results and the last time a beacon was received in the result of the scan. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | mac80211: add spectrum capabilitiesTomas Winkler2008-06-301-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add spectrum capability and required information elements to association request providing AP has requested it and it is supported by the driver Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Assaf Krauss <assaf.krauss@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | mac80211: add MAC80211_VERBOSE_SPECT_MGMT_DEBUG Kconfig optionYi Zhu2008-06-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The patch introduces MAC80211_VERBOSE_SPECT_MGMT_DEBUG Kconfig option to suppress Spectrum Management 802.11h related debug logs. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | vlan: Add GVRP supportPatrick McHardy2008-07-057-13/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add GVRP support for dynamically registering VLANs with switches. By default GVRP is disabled because we only support the applicant-only participant model, which means it should not be enabled on vlans that are members of a bridge. Since there is currently no way to cleanly determine that, the user is responsible for enabling it. The code is pretty small and low impact, its wrapped in a config option though because it depends on the GARP implementation and the STP core. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | vlan: Move device unregistration before lower dev cleanupPatrick McHardy2008-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move the unregister_netdevice() call for the VLAN device before cleanup for the lower device. This is needed by GVRP so it can send a leave message before the applicant on the lower device is cleaned up. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | vlan: Change vlan_dev_set_vlan_flag() to handle multiple flags at oncePatrick McHardy2008-07-054-19/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change vlan_dev_set_vlan_flag() to handle multiple flags at once and rename to vlan_dev_change_flags(). This allows to to use it from the netlink interface, which in turn allows to handle necessary adjustments when changing flags centrally. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | net: Add GARP applicant-only participantPatrick McHardy2008-07-053-0/+638
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add an implementation of the GARP (Generic Attribute Registration Protocol) applicant-only participant. This will be used by the following patch to add GVRP support to the VLAN code. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bridge: Use STP demuxPatrick McHardy2008-07-054-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | Use the STP demux layer for receiving STP PDUs instead of directly registering with LLC. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | net: Add STP demux layerPatrick McHardy2008-07-054-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add small STP demux layer for demuxing STP PDUs based on MAC address. This is needed to run both GARP and STP in parallel (or even load the modules) since both use LLC_SAP_BSPAN. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | MIB: add struct net to UDP6_INC_STATS_BHPavel Emelyanov2008-07-051-6/+7
| | | | | | | | | | | | | | | | | | Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | MIB: add struct net to UDP6_INC_STATS_USERPavel Emelyanov2008-07-051-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | As simple as the patch #1 in this set. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | MIB: add struct net to UDP_INC_STATS_BHPavel Emelyanov2008-07-052-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two special cases here - one is rxrpc - I put init_net there explicitly, since we haven't touched this part yet. The second place is in __udp4_lib_rcv - we already have a struct net there, but I have to move its initialization above to make it ready at the "drop" label. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | MIB: add struct net to UDP_INC_STATS_USERPavel Emelyanov2008-07-051-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing special - all the places already have a struct sock at hands, so use the sock_net() net. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | netns: selective flush of rt_cacheDenis V. Lunev2008-07-051-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | dst cache is marked as expired on the per/namespace basis by previous path. Right now we have to implement selective cache shrinking. This procedure has been ported from older OpenVz codebase. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | netns: place rt_genid into struct netDenis V. Lunev2008-07-051-33/+43
| | | | | | | | | | | | | | | Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud