summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-06-27net: skb_free_datagram_locked() doesnt drop all packetsEric Dumazet
dropwatch wrongly diagnose all received UDP packets as drops. This patch removes trace_kfree_skb() done in skb_free_datagram_locked(). Locations calling skb_free_datagram_locked() should do it on their own. As a result, drops are accounted on the right function. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27netlink: Get rid of obsolete rtnetlink macrosThomas Graf
Removes all RTA_GET*() and RTA_PUT*() variations, as well as the the unused rtattr_strcmp(). Get rid of rtm_get_table() by moving it to its only user decnet. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27decnet: Do not use RTA_PUT() macrosThomas Graf
Also, no need to trim on nlmsg_put() failure, nothing has been added yet. We also want to use nlmsg_end(), nlmsg_new() and nlmsg_free(). Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27ip6mr: Do not use RTA_PUT() macrosThomas Graf
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27ipmr: Do not use RTA_PUT() macrosThomas Graf
Also fix a needless skb tailroom check for a 4 bytes area after after each rtnexthop block. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27inet_diag: Do not use RTA_PUT() macrosThomas Graf
Also, no need to trim on nlmsg_put() failure, nothing has been added yet. We also want to use nlmsg_end(), nlmsg_new() and nlmsg_free(). Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27sock_diag: Do not use RTA_PUT() macrosThomas Graf
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27unix_diag: Do not use RTA_PUT() macrosThomas Graf
Also, no need to trim on nlmsg_put() failure, nothing has been added yet. We also want to use nlmsg_end(), nlmsg_new() and nlmsg_free(). Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27ipv4: tcp: dont cache unconfirmed intput dstEric Dumazet
DDOS synflood attacks hit badly IP route cache. On typical machines, this cache is allowed to hold up to 8 Millions dst entries, 256 bytes for each, for a total of 2GB of memory. rt_garbage_collect() triggers and tries to cleanup things. Eventually route cache is disabled but machine is under fire and might OOM and crash. This patch exploits the new TCP early demux, to set a nocache boolean in case incoming TCP frame is for a not yet ESTABLISHED or TIMEWAIT socket. This 'nocache' boolean is then used in case dst entry is not found in route cache, to create an unhashed dst entry (DST_NOCACHE) SYN-cookie-ACK sent use a similar mechanism (ipv4: tcp: dont cache output dst for syncookies), so after this patch, a machine is able to absorb a DDOS synflood attack without polluting its IP route cache. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Hans Schillstrom <hans.schillstrom@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27be2net: Fix to trim skb for padded vlan packets to workaround an ASIC BugSomnath Kotur
Fixed spelling error in a comment as pointed out by DaveM. Also refactored existing code a bit to provide placeholders for another ASIC Bug workaround that will be checked-in soon after this. Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27net: sh_eth: add support for set_ringparam/get_ringparamYoshihiro Shimoda
This patch supports the ethtool's set_ringparam() and get_ringparam(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27net: sh_eth: fix up the buffer pointersYoshihiro Shimoda
After freeing the buffer, the driver should change the value of the pointer to NULL. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27net: sh_eth: remove unnecessary members/definitionsYoshihiro Shimoda
This patch removes unnecessary members in sh_th_private. This patch also removes unnecessary definitions in sh_eth.h Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27net: sh_eth: remove unnecessary functionYoshihiro Shimoda
The sh_eth_timer() called mod_timer() for itself. So, this patch removes the function. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27bnx2x: Change bnx2x_tests_str_arr to static charMerav Sicron
This patch changes the definition of bnx2x_tests_str_arr from char to static char. This correction will also eliminate the sparse warning created in commit cf2c1df62e065bfc15e38daf2d3479a56b320f29. Signed-off-by: Merav Sicron <meravs@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27bnx2x, bnx2fc, bnx2i, cnic: Add statistics support and FCoE capabilities ↵Barak Witkowski
advertisement 1. When FCoE offload driver is registered, copy its capabilities to the chip scratchpad. 2. Copy FCoE/iSCSI MAC addresses in aligned manner to chip scratchpad. 3. Add FCoE/iSCSI statistics collection support Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-276lowpan: double unlock on an error pathDan Carpenter
We already unlocked a few lines earlier here, so we can go directly to drop without passing through unlock. This was introduced recently in c5d3687f6c ('6lowpan: read data from skb safely'). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27netlink: Delete NLMSG_PUT and NLMSG_NEW.David S. Miller
No longer used and a poor interface as they were macros with embedded gotos. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27pkt_sched: sch_api: Move away from NLMSG_NEW().David S. Miller
And use nlmsg_data() while we're here too, as well as remove a useless cast. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27pkt_sched: cls_api: Move away from NLMSG_NEW().David S. Miller
And use nlmsg_data() while we're here too, as well as remove a useless cast. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27decnet: dn_table: Move away from NLMSG_NEW().David S. Miller
And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27decnet: dn_route: Move away from NLMSG_NEW().David S. Miller
And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27audit: netlink: Move away from NLMSG_NEW().David S. Miller
And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27infiniband: netlink: Move away from NLMSG_NEW().David S. Miller
And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27selinux: netlink: Move away from NLMSG_PUT().David S. Miller
And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27unix_diag: Move away from NLMSG_PUT().David S. Miller
And use nlmsg_data() while we're here too and remove useless casts. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27pkt_sched: act_api: Move away from NLMSG_PUT().David S. Miller
Move away from NLMSG_NEW() as well. And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27netfilter: nfnetlink_queue_core: Move away from NLMSG_PUT().David S. Miller
And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27netfilter: nfnetlink_log: Move away from NLMSG_PUT().David S. Miller
And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27netfilter: ipt_ULOG: Move away from NLMSG_PUT().David S. Miller
And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27inet_diag: Move away from NLMSG_PUT().David S. Miller
And use nlmsg_data() while we're here too, and remove useless casts. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27decnet: dn_rtmsg: Move away from NLMSG_PUT().David S. Miller
And use nlmsg_data() while we're here too. Also, remove pointless kernel log message. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27netfilter: ebt_ulog: Move away from NLMSG_PUT().David S. Miller
And use nlmsg_data() while we're here too. Also, free and NULL out skb when nlmsg_put() fails and remove pointless kernel log message. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27gdm72xx: Move away from NLMSG_PUT().David S. Miller
And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27connector: Move cn_test.c away from NLMSG_PUT().David S. Miller
And use nlmsg_data() while we're here too. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27connector: use nlmsg_put() instead of NLMSG_PUT() macro.Javier Martinez Canillas
The NLMSG_PUT() macro contains a hidden goto which makes the code hard to audit and very error prone. While been there also use the inline function nlmsg_data() instead of the NLMSG_DATA() macro to do explicit type checking. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27team: remove unused rcu_head field from team_port structJiri Pirko
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27team: do not allow to map disabled portsJiri Pirko
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27team: fix team_adjust_ops with regard to enabled portsJiri Pirko
team_adjust_ops should check for enabled ports, not all ports. This may lead to division by zero. This patch fixes this. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27mac802154: add monitor listener to TX datapathalex.bluesman.smirnov@gmail.com
Add monitor receive callback to the TX datapath to catch all the data sent to transceivers. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27drivers/ieee802154: add support for the at86rf230/231 transceiversalex.bluesman.smirnov@gmail.com
The AT86RF231 is a feature rich, low-power 2.4 GHz radio transceiver designed for industrial and consumer ZigBee/IEEE 802.15.4, 6LoWPAN, RF4CE and high data rate 2.4 GHz ISM band applications. This patch adds support for the Atmel RF230/231 radio transceivers. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27mac802154: mlme start requestalex.bluesman.smirnov@gmail.com
Basic preparations to start the interface. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27mac802154: page and channel setteralex.bluesman.smirnov@gmail.com
A new method to set page and channel values for a transceiver was added to the MIB. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27mac802154: short address setteralex.bluesman.smirnov@gmail.com
A method to assign the IEEE802.15.4 short address was added to the MIB implementation. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27mac802154: set and get PAN idalex.bluesman.smirnov@gmail.com
Two methods intended to get and set the Private Area Network identifier were added to the MIB implementation. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27mac802154: add wpan device-class supportalex.bluesman.smirnov@gmail.com
Every real 802.15.4 transceiver, which works with software MAC layer, can be classified as a wpan device in this stack. So the wpan device implementation provides missing link in datapath between the device drivers and the Linux network queue. According to the IEEE 802.15.4 standard each packet can be one of the following types: - beacon - MAC layer command - ACK - data This patch adds support for the data packet-type only, but this is enough to perform data transmission and receiving over radio. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-27net: qmi_wwan: simplify a check in qmi_wwan_bind()Dan Carpenter
This code is easier to read if we specify which flags we want at the condition instead of at the top of the function. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-26ipv4: Cache ip_error() routes even when not forwarding.David S. Miller
And account for the fact that, when we are not forwarding, we should bump statistic counters rather than emit an ICMP response. RP-filter rejected lookups are still not cached. Since -EHOSTUNREACH and -ENETUNREACH can now no longer be seen in ip_rcv_finish(), remove those checks. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-26ipv4: Remove unnecessary code from rt_check_expire().David S. Miller
IPv4 routing cache entries no longer use dst->expires, because the metrics, PMTU, and redirect information are stored in the inetpeer cache. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-26batman-adv: fix global TT entry deletionAntonio Quartulli
During the last merge involving translation-table.c something went wrong and two lines disappeared from translation-table.c. This patch recovers them. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: David S. Miller <davem@davemloft.net>