aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2012-11-15ipv6: Add new offload registration infrastructure.Vlad Yasevich4-0/+41
Create a new data structure for IPv6 protocols that holds GRO/GSO callbacks and a new array to track the protocols that register GRO/GSO. Signed-off-by: Vlad Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-15net: Add net protocol offload registration infrustructureVlad Yasevich2-0/+33
Create a new data structure for IPv4 protocols that holds GRO/GSO callbacks and a new array to track the protocols that register GRO/GSO. Signed-off-by: Vlad Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-15net: Switch to using the new packet offload infrustructureVlad Yasevich3-10/+20
Convert to using the new GSO/GRO registration mechanism and new packet offload structure. Signed-off-by: Vlad Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-15net: Add generic packet offload infrastructure.Vlad Yasevich1-0/+80
Create a new data structure to contain the GRO/GSO callbacks and add a new registration mechanism. Singed-off-by: Vlad Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-15sctp: fix /proc/net/sctp/ memory leakTommi Rantala1-4/+4
Commit 13d782f ("sctp: Make the proc files per network namespace.") changed the /proc/net/sctp/ struct file_operations opener functions to use single_open_net() and seq_open_net(). Avoid leaking memory by using single_release_net() and seq_release_net() as the release functions. Discovered with Trinity (the syscall fuzzer). Signed-off-by: Tommi Rantala <[email protected]> Acked-by: Neil Horman <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-15ip6tnl: fix sparse warnings in ip6_tnl_netlink_parms()Nicolas Dichtel1-1/+1
This change fixes a sparse warning triggered by casting the flowinfo from netlink messages in an u32 instead of be32. This change corrects that in order to resolve the sparse warning. Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-15sit: fix sparse warningsNicolas Dichtel1-5/+5
This change fixes several sparse warnings about endianness problem. The wrong nla_*() functions were used. It also fix a sparse warning about a flag test (field i_flags). This field is used in this file like a local flag only, so it is more an u16 (gre uses it as a be16). This sparse warning was already there before the patch that add netlink management, the code has just been moved. Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-15ipip: fix sparse warnings in ipip_netlink_parms()Nicolas Dichtel1-2/+2
This change fixes two sparse warnings triggered by casting the ip addresses from netlink messages in an u32 instead of be32. This change corrects that in order to resolve the sparse warnings. Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-15xfrm: Use a static gc threshold value for ipv6Steffen Klassert1-15/+1
Unlike ipv4 did, ipv6 does not handle the maximum number of cached routes dynamically. So no need to try to handle the IPsec gc threshold value dynamically. This patch sets the IPsec gc threshold value back to 1024 routes, as it is for non-IPsec routes. Signed-off-by: Steffen Klassert <[email protected]>
2012-11-14Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-mergeDavid S. Miller11-173/+416
Included changes: - hash computation improvements - Bridge Loop Avoidance set-up phase optimisations - Roaming handling code redesign - some code cleanups Signed-off-by: David S. Miller <[email protected]>
2012-11-14Merge branch 'for-davem' of ↵David S. Miller83-1450/+7319
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next John W. Linville says: ==================== Included is a Bluetooth pull -- Gustavo says: "These are the Bluetooth bits for inclusion in 3.8, there is basically one big thing here which is the High Speed patches from Andrei, he did a lot of work on A2MP and management of AMP devices. The rest are mostly clean up and bug fixes." Also included is an NFC pull -- Samuel says: "With this one we have: - pn544 p2p support. - pn544 physical and HCI layers separation. We are getting the pn544 driver ready to support non i2c physical layers. - LLCP SNL (Service Name Lookup). This is the NFC p2p service discovery protocol. - LLCP datagram sockets (connection less) support. - IDR library usage for NFC devices indexes assignement. - NFC netlink extension for setting and getting LLCP link characteristics. - Various code style fixes and cleanups spread over the pn533, LLCP, HCI and pn544 code." There are a couple of mac80211 pulls as well -- Johannes says: "Please pull my mac80211-next tree to get the first round of new features for 3.8. We have: * finally, the mac80211 multi-channel work * scan improvements: - bg scan - scan flush - forced AP scan * cfg80211 tracing * a bit of new code to allow implementing SAE (secure authentication of equals) in managed mode Along with a few random improvements, features and fixes." and... "Please pull from mac80211-next (per below pull request) to get a few updates. Most important is probably the fix for the WDS regression that my previous pull request introduced. Other than that, I have some tracing code, two mesh updates and a change to allow drivers to calculate the AES CMAC subkeys without having to implement the GF_mulx operation themselves." On top of that are the usual updates to iwlwifi, ath9k, rt2x00, brcmfmac, mwifiex, and a few others here and there. Of note is the addition of the ar5523 driver, ported from an original FreeBSD driver. ==================== Signed-off-by: David S. Miller <[email protected]>
2012-11-14sit: add support of link creation via rtnlNicolas Dichtel1-28/+150
This patch add the support of 'ip link .. type sit'. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14sit: rename rtnl functions for consistencyNicolas Dichtel1-4/+4
Functions in this file start with ipip6_. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14sit/rtnl: add missing parameters on dumpNicolas Dichtel1-1/+8
IFLA_IPTUN_FLAGS and IFLA_IPTUN_PMTUDISC were missing. There is only one possible flag in i_flag: SIT_ISATAP. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14sit: always notify change when params are updatedNicolas Dichtel1-17/+15
netdev_state_change() was called only when end points or link was updated. Now that all parameters are advertised via netlink, we must advertise any change. This patch also prepares the support of sit tunnels management via rtnl. The code which update tunnels will be put in a new function. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14ipip: add support of link creation via rtnlNicolas Dichtel1-24/+141
This patch add the support of 'ip link .. type ipip'. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14ipip/rtnl: add IFLA_IPTUN_PMTUDISC on dumpNicolas Dichtel1-1/+5
This parameter was missing in the dump. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14ipip: always notify change when params are updatedNicolas Dichtel1-18/+16
netdev_state_change() was called only when end points or link was updated. Now that all parameters are advertised via netlink, we must advertise any change. This patch also prepares the support of ipip tunnels management via rtnl. The code which update tunnels will be put in a new function. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14ip6tnl: add support of link creation via rtnlNicolas Dichtel1-15/+149
This patch add the support of 'ip link .. type ip6tnl'. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14ip6tnl: rename rtnl functions for consistencyNicolas Dichtel1-4/+4
Functions in this file start with ip6_tnl_. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14ip6tnl/rtnl: add IFLA_IPTUN_PROTO on dumpNicolas Dichtel1-1/+4
IPv6 tunnels can have three mode: 4in6, 6in6 and xin6. This information was missing in the netlink message. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14ipv4/ip_vti.c: VTI fix post-decryption forwardingSaurabh Mohan1-0/+5
With the latest kernel there are two things that must be done post decryption so that the packet are forwarded. 1. Remove the mark from the packet. This will cause the packet to not match the ipsec-policy again. However doing this causes the post-decryption check to fail also and the packet will get dropped. (cat /proc/net/xfrm_stat). 2. Remove the sp association in the skbuff so that no policy check is done on the packet for VTI tunnels. Due to #2 above we must now do a security-policy check in the vti rcv path prior to resetting the mark in the skbuff. Signed-off-by: Saurabh Mohan <[email protected]> Reported-by: Ruben Herold <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14bridge: add root port blockingstephen hemminger4-2/+28
This is Linux bridge implementation of root port guard. If BPDU is received from a leaf (edge) port, it should not be elected as root port. Why would you want to do this? If using STP on a bridge and the downstream bridges are not fully trusted; this prevents a hostile guest for rerouting traffic. Why not just use netfilter? Netfilter does not track of follow spanning tree decisions. It would be difficult and error prone to try and mirror STP resolution in netfilter module. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14bridge: implement BPDU blockingstephen hemminger4-1/+15
This is Linux bridge implementation of STP protection (Cisco BPDU guard/Juniper BPDU block). BPDU block disables the bridge port if a STP BPDU packet is received. Why would you want to do this? If running Spanning Tree on bridge, hostile devices on the network may send BPDU and cause network failure. Enabling bpdu block will detect and stop this. How to recover the port? The port will be restarted if link is brought down, or removed and reattached. For example: # ip li set dev eth0 down; ip li set dev eth0 up Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14bridge: add template for bridge port flagsstephen hemminger1-15/+23
Provide macro to build sysfs data structures and functions for accessing flag bits. If flag bits change do netlink notification. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14bridge: bridge port parameters over netlinkstephen hemminger1-33/+132
Expose bridge port parameter over netlink. By switching to a nested message, this can be used for other bridge parameters. This changes IFLA_PROTINFO attribute from one byte to a full nested set of attributes. This is safe for application interface because the old message used IFLA_PROTINFO and new one uses IFLA_PROTINFO | NLA_F_NESTED. The code adapts to old format requests, and therefore stays compatible with user mode RSTP daemon. Since the type field for nested and unnested attributes are different, and the old code in libnetlink doesn't do the mask, it is also safe to use with old versions of bridge monitor command. Note: although mode is only a boolean, treating it as a full byte since in the future someone will probably want to add more values (like macvlan has). Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14ipv6: remove obsolete comments in route.cLi RongQing1-6/+0
Signed-off-by: Li RongQing <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14net: unify for_each_ip_tunnel_rcu()Amerigo Wang5-49/+18
The defitions of for_each_ip_tunnel_rcu() are same, so unify it. Also, don't hide the parameter 't'. Cc: David S. Miller <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14net: convert __IPTUNNEL_XMIT() to an inline functionAmerigo Wang6-65/+3
__IPTUNNEL_XMIT() is an ugly macro, convert it to a static inline function, so make it more readable. IPTUNNEL_XMIT() is unused, just remove it. Cc: David S. Miller <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-14batman-adv: Remove instant overwritten variable initializationSven Eckelmann2-11/+11
Signed-off-by: Sven Eckelmann <[email protected]> Signed-off-by: Marek Lindner <[email protected]> Signed-off-by: Antonio Quartulli <[email protected]>
2012-11-14batman-adv: roaming handling mechanism redesignAntonio Quartulli1-39/+118
This patch allows clients to roam multiple times within the same originator-interval. To enable this new feature two key aspects that have been introduced: 1) packets are always directed to the node that was originally serving the roamed client which will then re-route the data to the correct destination at any point in time; 2) the client flags handling mechanism has been properly modified in order to allow multiple roamings withinin the same orig-int. Therefore flags are now set properly even in this scenario. Signed-off-by: Antonio Quartulli <[email protected]>
2012-11-14batman-adv: refactor tt_global_del_struct()Antonio Quartulli1-10/+9
batadv_tt_global_del_struct() function is not properly named. Having a more meaningful name which reflects the current behavior helps other developers to easily understand what it does. A parameter has also been renamed in order to let the function header better fit the 80-chars line-width Signed-off-by: Antonio Quartulli <[email protected]>
2012-11-14batman-adv: refactor code to simplify long linesAntonio Quartulli1-32/+30
Signed-off-by: Antonio Quartulli <[email protected]>
2012-11-14batman-adv: substitute tt_poss_change with a per-tt_entry flagAntonio Quartulli6-75/+156
tt_poss_change is a node-wide flag which tells whether the node is in a roaming state (a client recently moved to/away from it) in order to let it apply special re-routing rules. However this flag does not give a clear idea of the current state because it is not possible to understand *which client* is actually involved in the roaming. For this reason a better approach has been chosen: instead of using a node-wide variable, the roaming state is now given by a per-tt_entry ROAM flag which, in case of packet coming through the node, tells the node whether the real destination is in roaming state or not. With this flag change, batadv_check_unicast_ttvn() has also been rearranged in order to better fit the new re-routing logic and to be much more readable. Signed-off-by: Antonio Quartulli <[email protected]>
2012-11-14batman-adv: wait multiple periods before activating blaSimon Wunderlich3-1/+10
For some reasons (bridge forward delay, network device setup order, etc) the initial bridge loop avoidance announcement packets may be lost. This may lead to problems in finding other backbone gws, and therfore create loops in the startup time. Fix this by extending the waiting periods to 3 (define can be changed) before allowing broadcast traffic. Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Antonio Quartulli <[email protected]>
2012-11-14batman-adv: allow bla traffic only after first worker periodSimon Wunderlich1-1/+19
When adding a backbone gateway for the first time, it might not yet be known in the backbone, and therefore we should not forward broadcasts yet. This behaviour is the same as when sending a request to another backbone gw because of a CRC mismatch. The backbone gw will operate normal after the next periodic bla work. Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Antonio Quartulli <[email protected]>
2012-11-14batman-adv: send announcement when backbone gw is registeredSimon Wunderlich1-4/+10
To avoid loops in the startup phase until the first announcement is sent, send an announcement immediately as soon as a backbone gw is added. This may happen due to various reasons, e.g. a packet passes the rx or tx path. Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Antonio Quartulli <[email protected]>
2012-11-14batman-adv: prevent using any virtual device created on batman-adv as ↵Antonio Quartulli1-1/+40
hard-interface Any virtual device created on top of a batman-adv mesh interface must be prevented to be used to create a new mesh network (this would lead to an unwanted batman-over-batman configuration) Signed-off-by: Antonio Quartulli <[email protected]>
2012-11-14batman-adv: fix wrong spinlock inline commentAntonio Quartulli1-1/+1
Signed-off-by: Antonio Quartulli <[email protected]>
2012-11-14batman-adv: don't rely on positions in struct for hashingSimon Wunderlich2-14/+28
The hash functions in the bridge loop avoidance code expects the VLAN vid to be right after the mac address, but this is not guaranteed. Fix this by explicitly hashing over the right fields of the struct. Reported-by: Marek Lindner <[email protected]> Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Antonio Quartulli <[email protected]>
2012-11-14Merge branch 'for-upstream' of ↵John W. Linville12-174/+1412
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
2012-11-14Merge branch 'master' of ↵John W. Linville3-8/+10
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
2012-11-14Merge branch 'for-john' of ↵John W. Linville9-12/+37
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
2012-11-14Merge branch 'master' of ↵John W. Linville83-1450/+7319
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2012-11-13openvswitch: add ipv6 'set' actionAnsis Atteka2-0/+113
This patch adds ipv6 set action functionality. It allows to change traffic class, flow label, hop-limit, ipv6 source and destination address fields. Signed-off-by: Ansis Atteka <[email protected]> Signed-off-by: Jesse Gross <[email protected]>
2012-11-13mac80211: support RX_FLAG_MACTIME_ENDThomas Pedersen5-64/+85
Allow drivers to indicate their mactime is at RX completion and adjust for this in mac80211. Also rename the existing RX_FLAG_MACTIME_MPDU to RX_FLAG_MACTIME_START to clarify its intent. Based on similar code by Johannes Berg. Signed-off-by: Thomas Pedersen <[email protected]> [fix docs, atheros drivers] Signed-off-by: Johannes Berg <[email protected]>
2012-11-13mac80211: deinitialize ibss-internals after emptiness checkSimon Wunderlich1-4/+4
The check whether the IBSS is active and can be removed should be performed before deinitializing the fields used for the check/search. Otherwise, the configured BSS will not be found and removed properly. To make it more clear for the future, rename sdata->u.ibss to the local pointer ifibss which is used within the checks. This behaviour was introduced by f3209bea110cade12e2b133da8b8499689cb0e2e ("mac80211: fix IBSS teardown race") Cc: [email protected] Cc: Ignacy Gawedzki <[email protected]> Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-13ipv6: setsockopt(IPIPPROTO_IPV6, IPV6_MINHOPCOUNT) forgot to set return valueHannes Frederic Sowa1-0/+1
Cc: Stephen Hemminger <[email protected]> Signed-off-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-13tcp: tcp_replace_ts_recent() should not be called from tcp_validate_incoming()Eric Dumazet1-5/+10
We added support for RFC 5961 in latest kernels but TCP fails to perform exhaustive check of ACK sequence. We can update our view of peer tsval from a frame that is later discarded by tcp_ack() This makes timestamps enabled sessions vulnerable to injection of a high tsval : peers start an ACK storm, since the victim sends a dupack each time it receives an ACK from the other peer. As tcp_validate_incoming() is called before tcp_ack(), we should not peform tcp_replace_ts_recent() from it, and let callers do it at the right time. Signed-off-by: Eric Dumazet <[email protected]> Cc: Neal Cardwell <[email protected]> Cc: Yuchung Cheng <[email protected]> Cc: Nandita Dukkipati <[email protected]> Cc: H.K. Jerry Chu <[email protected]> Cc: Romain Francoise <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-13ipv6: add knob to send unsolicited ND on link-layer address changeHannes Frederic Sowa2-0/+15
This patch introduces a new knob ndisc_notify. If enabled, the kernel will transmit an unsolicited neighbour advertisement on link-layer address change to update the neighbour tables of the corresponding hosts more quickly. This is the equivalent to arp_notify in ipv4 world. Signed-off-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: David S. Miller <[email protected]>