summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* batman-adv: Start new development cycleSimon Wunderlich2014-01-121-1/+1
| | | | | Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
* batman-adv: update copyright years for 2014Simon Wunderlich2014-01-1241-41/+41
| | | | | | Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
* batman-adv: add build checks for packet sizesSimon Wunderlich2014-01-121-7/+17
| | | | | | | | | | | With unrolling the batadv_header into the respective structures, the offsetof checks are now useless. Instead, add build checks for all packet types which go over the wire to avoid problems with wrong sizes or compatibility issues on some architectures which don't use every day. Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
* batman-adv: add missing sysfs attributes to READMEAntonio Quartulli2014-01-121-5/+4
| | | | | | | Add missing sysfs attributes in the proper section of the README Signed-off-by: Antonio Quartulli <antonio@meshcoding.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
* batman-adv: remove returns at the end of void functionsAntonio Quartulli2014-01-121-7/+0
| | | | | | | | | | | | Return at the end of void functions is not needed. Since most of the void functions in the code do not do so, make all the others consistent by removing the useless returns. Actually all the functions to be "fixed" are in network-coding.h only. Signed-off-by: Antonio Quartulli <antonio@meshcoding.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
* batman-adv: add debugfs support to view multiif tablesSimon Wunderlich2014-01-125-7/+73
| | | | | | | | | | | | Show tables for the multi interface operation. Originator tables are added per hard interface. This patch also changes the API by adding the interface to the bat_orig_print() parameters. Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
* batman-adv: add debugfs structure for information per interfaceSimon Wunderlich2014-01-124-0/+86
| | | | | | | | | | To show information per interface, add a debugfs hardif structure similar to the system in sysfs. Hard interface folders will be created in "$debugfs/batman-adv/". Files are not yet added. Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
* batman-adv: add bonding againSimon Wunderlich2014-01-124-4/+121
| | | | | | | | | | | | | With the new interface alternating, the first hop may send packets in a round robin fashion to it's neighbors because it has multiple valid routes built by the multi interface optimization. This patch enables the feature if bonding is selected. Note that unlike the bonding implemented before, this version is much simpler and may even enable multi path routing to a certain degree. Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
* batman-adv: consider outgoing interface in OGM sendingSimon Wunderlich2014-01-123-64/+115
| | | | | | | | | | | | | | | | | | The current OGM sending an aggregation functionality decides on which interfaces a packet should be sent when it parses the forward packet struct. However, with the network wide multi interface optimization the outgoing interface is decided by the OGM processing function. This is reflected by moving the decision in the OGM processing function and add the outgoing interface in the forwarding packet struct. This practically implies that an OGM may be added multiple times (once per outgoing interface), and this also affects aggregation which needs to consider the outgoing interface as well. Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
* batman-adv: add WiFi penaltySimon Wunderlich2014-01-123-6/+24
| | | | | | | | | | | | | If the same interface is used for sending and receiving, there might be throughput degradation on half-duplex interfaces such as WiFi. Add a penalty if the same interface is used to reflect this problem in the metric. At the same time, change the hop penalty from 30 to 15 so there will be no change for single wifi mesh network. the effective hop penalty will stay at 30 due to the new wifi penalty for these networks. Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
* batman-adv: split out router from orig_nodeSimon Wunderlich2014-01-1211-219/+605
| | | | | | | | | | | | | | For the network wide multi interface optimization there are different routers for each outgoing interface (outgoing from the OGM perspective, incoming for payload traffic). To reflect this, change the router and associated data to a list of routers. While at it, rename batadv_orig_node_get_router() to batadv_orig_router_get() to follow the new naming scheme. Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
* batman-adv: split tq information in neigh_node structSimon Wunderlich2014-01-129-114/+588
| | | | | | | | | | | | | | For the network wide multi interface optimization it is required to save metrics per outgoing interface in one neighbor. Therefore a new type is introduced to keep interface-specific information. This also requires some changes in access and list management. The compare and equiv_or_better API calls are changed to take the outgoing interface into consideration. Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
* batman-adv: remove bonding and interface alternatingSimon Wunderlich2014-01-125-327/+12
| | | | | | | | | | | | | Remove bonding and interface alternating code - it will be replaced by a new, network-wide multi interface optimization which enables both bonding and interface alternating in a better way. Keep the sysfs and find router function though, this will be needed later. Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
* Merge branch 'alx_stats'David S. Miller2014-01-116-4/+331
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sabrina Dubroca says: ==================== alx: add statistics Currently, the alx driver doesn't support statistics [1,2]. The original alx driver [3] that Johannes Berg modified provided statistics. This patch is an adaptation of the statistics code from the original driver to the alx driver included in the kernel. v4: - modified the assignements of hw stats to netstats (Ben Hutchings) - added comments to describe the stats fields (copied from atlx) v3: - renamed __alx_update_hw_stats to alx_update_hw_stats (Stephen Hemminger) v2: - use u64 instead of unsigned long (Ben Hutchings) - implement ndo_get_stats64 instead of ndo_get_stats (Ben Hutchings) - use EINVAL instead of ENOTSUPP (Ben Hutchings) - add BUILD_BUG_ON to check the size of the stats (Johannes Berg, Ben Hutchings) - add a comment regarding persistence of the stats (Stephen Hemminger) - align assignments in __alx_update_hw_stats [1] https://bugzilla.kernel.org/show_bug.cgi?id=63401 [2] http://www.spinics.net/lists/netdev/msg245544.html [3] https://github.com/mcgrof/alx ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * alx: add stats to ethtoolSabrina Dubroca2014-01-112-1/+107
| | | | | | | | | | | | Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * alx: add alx_get_stats64 operationSabrina Dubroca2014-01-112-0/+53
| | | | | | | | | | | | Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * alx: add stats update functionSabrina Dubroca2014-01-112-0/+62
| | | | | | | | | | Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * alx: add constants for the stats fieldsSabrina Dubroca2014-01-111-4/+48
| | | | | | | | | | Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>
| * alx: add a hardware stats structureSabrina Dubroca2014-01-111-0/+62
|/ | | | | Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2014-01-1118-62/+887
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates This series contains updates to i40e and now i40evf. Most notable is Jacob's patch to add PTP support to i40e. Mitch cleans up additional memcpy's and use struct assignment instead. Then fixes long lines to appease checkpatch.pl. Mitch then provides a fix to keep us from spamming the log with confusing errors. If you use ip to change the MAC address of a VF while the VF driver is loaded, closing the VF interface or unloading the VF driver will cause the VF driver to remove the MAC filter for its original (now invalid) MAC address. Jesse cleans up macros which are no longer needed or used. I (Jeff) cleanup function header comments to ensure Doxygen/kdoc works correctly to generate documentation without warnings. Anjali fixes a bug where ethtool set-channels would return failure when configuring only one Rx queue. Then fixes a bug where the driver was erroneously exiting the driver unload path if one part of the unload failed. Shannon fixes if the IPV6EXADD but is set in the Rx descriptor status, there was an optional extension header with an alternate IP address detected and the hardware checksum was not handling the alternate IP address correctly. Then adjusts the ITR max and min values to match the hardware max value and recommended min value. Shannon makes sure to clear the PXE mode after the adminq is initialized. v2: - fix patch 14 "i40e: enable PTP" to address Richard Cochran's spelling catch and Ben Hutchings Kconfig, SIOCGHWTSTAMP and sizeof() suggestions - added Paul Gortmaker's i40evf fix patch v3: - fix patch 14 "i40e: enable PTP" to address Ben Hutchings concerns about a race with PTP init and cleanup and i40e_get_ts_info(). ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * i40evf: fix s390 build failure due to implicit prefetch.hPaul Gortmaker2014-01-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of commit 7f12ad741a4870b8b6e3aafbcd868d0191770802 ("i40evf: transmit and receive functionality") the s390 builds (allyesconfig) fail with: drivers/net/ethernet/intel/i40evf/i40e_txrx.c: In function 'i40e_clean_rx_irq': drivers/net/ethernet/intel/i40evf/i40e_txrx.c:818:3: error: implicit declaration of function 'prefetch' make[5]: *** [drivers/net/ethernet/intel/i40evf/i40e_txrx.o] Error 1 due to an implicit assumption that the prototype from linux/prefetch.h will be present. Cc: Mitch Williams <mitch.a.williams@intel.com> Cc: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Bump versionCatherine Sullivan2014-01-101-1/+1
| | | | | | | | | | | | | | | | Update the driver version to 0.3.28-k. Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: fix log message wordingShannon Nelson2014-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | Change the redundant "vsi VSI" to VSI. Change-ID: Ic16ea5820a99abc7831713cde39e7d032a7ba4d3 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: enable PTPJacob Keller2014-01-108-2/+824
| | | | | | | | | | | | | | | | | | | | | | | | New feature: Enable PTP support in the i40e driver. Change-ID: I6a8e799f582705191f9583afb1b9231a8db96cc8 Cc: Richard Cochran <richardcochran@gmail.com> Cc: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Matthew Vick <matthew.vick@intel.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: call clear_pxe after adminq is initializedShannon Nelson2014-01-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | In the latest firmware the clear_pxe_mode function will use the AdminQ request, so call this after AdminQ is set up rather than relying on i40e_pf_reset() to clear the PXE mode. Change-ID: Ice8cba2e9cbc3c7bde0a0bcf8eaf5009abef040b Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: clear qtx_head before enabling Tx queueShannon Nelson2014-01-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | Make sure the "new" qtx_head[q] register is cleared before enabling the Tx queue. Change-ID: I0c7a12815e343a5ae68807af172a35d6c6857935 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: adjust ITR max and min valuesShannon Nelson2014-01-101-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Set the ITR max and min values to match the hardware max value and the recommended min value. These values are shifted right one bit because the register counts in 2 usec units, so leave a comment to explain. Change-ID: I289c27955cf6c566a6d21b95c3110b88cbb15dad Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: check for possible incorrect ipv6 checksumShannon Nelson2014-01-102-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the IPV6EXADD bit is set in the Rx descriptor status, there was an optional extension header with an alternate IP address detected. The HW checksum offload doesn't handle the alternate IP address correctly so likely comes up with the wrong answer. Thus, if the bit is set we ignore the checksum offload value. Change-ID: I70ff8d38cdcddccf44107691cae13d0c07c284c8 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: allow VF to remove any MAC filterMitch Williams2014-01-101-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you use ip to change the MAC address of a VF while the VF driver is loaded, closing the VF interface or unloading the VF driver will cause the VF driver to remove the MAC filter for its original (now invalid) MAC address. This would cause the PF driver to kick an error message to the log, and back to the VF driver. Since the VF driver has not really done anything naughty, let's not punish it. Don't check for MAC address overrides on the delete operation, just make sure it's a valid address. This keeps us from spamming the log with confusing errors. Change-ID: I1f051bd4014e50855457d928c9ee8b0766981b2f Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: do not bail when disabling if Tx queue disable failsAnjali Singhai Jain2014-01-101-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug where the driver was erroneously exiting the driver unload path if one part of the unload failed. Instead of the original way the driver should always continue when disabling and be sure to disable all queues. Change-ID: Ib8c81c596bc87c31d8e9ca97ebf871168475279d Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Setting queue count to 1 using ethtool is validAnjali Singhai Jain2014-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fix a bug where ethtool set-channels would return failure when configuring only one Rx queue. Change-ID: Id833c48c17d71e352b30f3249f6acf9e7aaec57e Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Cleanup Doxygen warningsJeff Kirsher2014-01-104-23/+24
| | | | | | | | | | | | | | | | | | These changes make Doxygen/kdoc work correctly without warnings. Change-ID: I2941f38860be805ff7548d84dae35754c83f1d62 Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
| * i40e: fix long linesMitch Williams2014-01-102-3/+4
| | | | | | | | | | | | | | | | | | | | Avoid over-length lines in order to appease checkpatch. Change-ID: I63820a710acf798f49d2f85c610228711af84f72 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Bump versionCatherine Sullivan2014-01-101-1/+1
| | | | | | | | | | | | | | | | | | Update driver version to 0.3.27-k Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: Update the Current NVM version Low valueAnjali Singhai Jain2014-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | The current driver will warn the user if the NVM version is out of date, this raises the bar to a newer version. Change-ID: I5ec21d8efa4e7c3fdacb56f85d310bb2229b1483 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: drop unused macrosJesse Brandeburg2014-01-101-9/+0
| | | | | | | | | | | | | | | | | | A previous commit removed any need for these macros, so remove them too. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * i40e: use assignment instead of memcpyMitch Williams2014-01-103-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | These instances were found by coccinelle/spatch, and can use struct assignment instead of memcpy. Change-ID: Idc23c3599241bf8a658bda18c80417af3fbfee66 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-mergeDavid S. Miller2014-01-1042-311/+437
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Included changes: - substitute FSF address with URL - deselect current bat-GW when GW-client mode gets deactivated - send every DHCP packet using bat-unicast messages when GW-client mode is enabled - implement the Extended Isolation mechanism (it is an enhancement of the already existing batman-AP-isolation). This mechanism allows the user to drop packets exchanged by selected clients by using netfilter marks. - fix typ0 in header guard - minor code cleanups Signed-off-by: David S. Miller <davem@davemloft.net>
| * | batman-adv: set the isolation mark in the skb if neededAntonio Quartulli2014-01-083-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a broadcast packet is coming from a client marked as isolated, then mark the skb using the isolation mark so that netfilter (or any other application) can recognise them. The mark is written in the skb based on the mask value: only bits set in the mask are substitued by those in the mark value Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
| * | batman-adv: create helper function to get AP isolation statusAntonio Quartulli2014-01-083-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | The AP isolation status may be evaluated in different spots. Create an helper function to avoid code duplication. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
| * | batman-adv: extend the ap_isolation mechanismAntonio Quartulli2014-01-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the AP isolation mechanism to not only "isolate" WIFI clients but also all those marked with the more generic "isolation flag" (BATADV_TT_CLIENT_ISOLA). The result is that when AP isolation is on any unicast packet originated by an "isolated" client and directed to another "isolated" client is dropped at the source node. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
| * | batman-adv: print the new BATADV_TT_CLIENT_ISOLA flagAntonio Quartulli2014-01-081-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print the new BATADV_TT_CLIENT_ISOLA flag properly in the Local and Global Translation Table output. The character 'I' is used in the flags column to indicate that the entry is marked as isolated. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
| * | batman-adv: mark a local client as isolated when neededAntonio Quartulli2014-01-085-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A client sending packets which mark matches the value configured via sysfs has to be identified as isolated using the TT_CLIENT_ISOLA flag. The match is mask based, meaning that only bits set in the mask are compared with those in the mark value. If the configured mask is equal to 0 no operation is performed. Such flag is then advertised within the classic client announcement mechanism. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
| * | batman-adv: add isolation_mark sysfs attributeAntonio Quartulli2014-01-084-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This attribute can be used to set and read the value and the mask of the skb mark which will be used to classify the source non-mesh client as ISOLATED. In this way a client can be advertised as such and the mark can potentially be restored at the receiving node before delivering the skb. This can be helpful for creating network wide netfilter policies. This sysfs file expects a string of the shape "$mark/$mask". Where $mark has to be a 32-bit number in any base, while $mask must be a 32bit mask expressed in hex base. Only bits in $mark covered by the bitmask are really stored. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
| * | batman-adv: send every DHCP packet as bat-unicastAntonio Quartulli2014-01-087-140/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In different situations it is possible that the DHCP server or client uses broadcast Ethernet frames to send messages to each other. The GW component in batman-adv takes care of using bat-unicast packets to bring broadcast DHCP Discover/Requests to the "best" server. On the way back the DHCP server usually sends unicasts, but upon client request it may decide to use broadcasts as well. This patch improves the GW component so that it now snoops and sends as unicast all the DHCP packets, no matter if they were generated by a DHCP server or client. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
| * | batman-adv: remove parenthesis from return statementsAntonio Quartulli2014-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Remove parenthesis around return expression as suggested by checkpatch. Signed-off-by: Antonio Quartulli <antonio@meshcoding.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
| * | batman-adv: rename gw_deselect() to gw_reselect()Antonio Quartulli2014-01-084-18/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function batadv_gw_deselect() is actually not deselecting anything. It is just informing the GW code to perform a re-election procedure when possible. The current gateway is not being touched at all and therefore the name of this function is rather misleading. Rename it to batadv_gw_reselect() to batadv_gw_reselect() to make its behaviour easier to grasp. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
| * | batman-adv: deselect current GW on client mode switch offAntonio Quartulli2014-01-082-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When switching from gw_mode client to either off or server the current selected gateway has to be deselected. In this way when client mode is enabled again a gateway re-election is forced and a GW_ADD event is consequently sent. The current behaviour instead is to keep the current gateway leading to no GW_ADD event when gw_mode client is selected for a second time Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
| * | batman-adv: remove FSF address from GPL disclaimerAntonio Quartulli2014-01-0841-123/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As suggested by checkpatch, remove all the references to the FSF address since the kernel already has one reference in its documentation. In this way it is easier to update it in case of future changes. Signed-off-by: Antonio Quartulli <antonio@meshcoding.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
| * | batman-adv: don't switch byte order too often if not neededAntonio Quartulli2014-01-081-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If possible, operations like ntohs/ntohl should not be performed too often. Use a variable to locally store the converted value and then use it. Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>