Hi
What happens if I add an interface to batman-adv (on which to exchange
mesh frames), and add that same interface to a bridge with bat0? E.g.
on an openwrt, br-lan contains eth0, bat0 and wlan0; batman-adv is
exchanging mesh frames on wlan1 and eth0.
Will I end up with BATMAN-on-BATMAN or will batman-adv filter out the
batman frames it sees on bat0?
thanks
donald
The current translation table mechanism is not suitable for multicast
addresses and we are currently flooding such frames anyway.
Therefore this patch prevents multicast MAC addresses being added to the
translation table.
Signed-off-by: Linus Lüssing <linus.luessing(a)web.de>
---
soft-interface.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/soft-interface.c b/soft-interface.c
index 2d1f895..9955319 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -180,7 +180,8 @@ static int batadv_interface_tx(struct sk_buff *skb,
goto dropped;
/* Register the client MAC in the transtable */
- batadv_tt_local_add(soft_iface, ethhdr->h_source, skb->skb_iif);
+ if (!is_multicast_ether_addr(ethhdr->h_source))
+ batadv_tt_local_add(soft_iface, ethhdr->h_source, skb->skb_iif);
/* don't accept stp packets. STP does not help in meshes.
* better use the bridge loop avoidance ...
--
1.7.10.4
Add Ethertype 0x4305 (not an officially registered id).
This Ethertype is used by every frame generated by B.A.T.M.A.N.-Advanced. Its
definition is currently batman-adv local only and since it is not officially
registered it is better to make its definition kernel-wide so that we avoid
collisions given by future unofficial uses of the same Ethertype.
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
---
include/uapi/linux/if_ether.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
index 0343e1f..67fb87c 100644
--- a/include/uapi/linux/if_ether.h
+++ b/include/uapi/linux/if_ether.h
@@ -48,6 +48,7 @@
#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */
#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */
#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */
+#define ETH_P_BATMAN 0x4305 /* B.A.T.M.A.N.-Advanced packet [ NOT AN OFFICIALLY REGISTERED ID ] */
#define ETH_P_DEC 0x6000 /* DEC Assigned proto */
#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */
#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */
--
1.7.12.4
It could be the case that the user tries to disable DAT when it is already
disabled. To prevent kernel oops, batadv_dat_hash_free() has to check for the
hash table pointer being different from NULL before to try to free it.
This was introduced by ("batman-adv: Distributed ARP Table - add runtime
switch")
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
---
distributed-arp-table.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/distributed-arp-table.c b/distributed-arp-table.c
index c933615..0fea29a 100644
--- a/distributed-arp-table.c
+++ b/distributed-arp-table.c
@@ -634,6 +634,9 @@ out:
*/
static void batadv_dat_hash_free(struct batadv_priv *bat_priv)
{
+ if (!bat_priv->dat.hash)
+ return;
+
__batadv_dat_purge(bat_priv, NULL);
batadv_hash_destroy(bat_priv->dat.hash);
--
1.7.12.4
Hello David,
this is again our first set of changes intended for net-next/linux-3.8.
With respect to the previous changeset we substituted the patch changing the
BAT_ATTR_HIF_UINT macro with a new one that removes it (we will re-add such
macro together with the user).
The rest is exactly the same as before.
Thank you very much,
Antonio
The following changes since commit a932657f51eadb8280166e82dc7034dfbff3985a:
net: sierra: shut up sparse restricted type warnings (2012-10-28 19:09:02 -0400)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git tags/batman-adv-for-davem
for you to fetch changes up to 0aca86cd92282359d2f7202804bd92e7d092c04e:
batman-adv: add kernel-doc for enum batadv_dbg_level (2012-10-29 09:42:51 +0100)
----------------------------------------------------------------
included changes:
- some code cleanups and minor fixes (3 of them were reported by Coverity)
- 'struct hard_iface' re-shaping to improve multi-protocol support
- ECTP packets silent drop
- transfer the WIFI flag on clients in case of roaming
----------------------------------------------------------------
Antonio Quartulli (8):
batman-adv: use check_unicast_packet() in recv_roam_adv()
batman-adv: return proper value in case of hash_add failure
batman-adv: properly store the roaming time
batman-adv: print packets re-routing on DBG_TT and ratelimit it
batman-adv: check for more space before accessing the skb
batman-adv: properly convert flag into a boolean value
batman-adv: pass the WIFI flag from the local to global entry
batman-adv: add kernel-doc for enum batadv_dbg_level
Marek Lindner (2):
batman-adv: split hard_iface struct for each routing protocol
batman-adv: consolidate duplicated primary_if checking code
Simon Wunderlich (1):
batman-adv: don't allow ECTP traffic on batman-adv
Sven Eckelmann (5):
batman-adv: Remove unused define BAT_ATTR_HIF_UINT
batman-adv: Set special lockdep classes to avoid lockdep warning
batman-adv: Remove extra check in batadv_bit_get_packet
batman-adv: Check return value of try_module_get
batman-adv: Only increase refcounter once for alternate router
net/batman-adv/bat_iv_ogm.c | 43 ++++++++++---------
net/batman-adv/bitarray.c | 23 +++++-----
net/batman-adv/bridge_loop_avoidance.c | 36 +++-------------
net/batman-adv/debugfs.c | 6 ++-
net/batman-adv/gateway_client.c | 19 ++-------
net/batman-adv/hard-interface.c | 4 +-
net/batman-adv/icmp_socket.c | 12 ++++--
net/batman-adv/main.c | 46 +++++++++++++++-----
net/batman-adv/main.h | 19 ++++++---
net/batman-adv/originator.c | 19 ++-------
net/batman-adv/routing.c | 54 +++++++++---------------
net/batman-adv/soft-interface.c | 56 ++++++++++++++++++++++++-
net/batman-adv/sysfs.c | 49 ----------------------
net/batman-adv/translation-table.c | 77 +++++++++++++++++-----------------
net/batman-adv/translation-table.h | 6 +--
net/batman-adv/types.h | 16 +++++--
16 files changed, 238 insertions(+), 247 deletions(-)
Hello,
as you may have seen in the last period, TT has been under heavily
re-design/work in order to improve its robustness (and also readability).
However, some more extensive tests and emulated scenarios revealed that it is
possible to hit some situations in which TT behaviour is not optimal.
This set of patches aims to fix some glitches introduces with the last re-design
and to fix some issues discovered by testing complex scenarios.
Cheers,
Antonio Quartulli (6):
batman-adv: fix TT packet rerouting
batman-adv: fix debug message
batman-adv: remove useless goto
batman-adv: send ROAMING_ADV once
batman-adv: remove useless assignment in tt_local_add()
batman-adv: fix local client recognition in is_my_client()
routing.c | 36 ++++++++++++++++++++++++++----------
translation-table.c | 22 +++++++++++-----------
2 files changed, 37 insertions(+), 21 deletions(-)
--
1.7.12.4