Is it possible to send all batman-adv ethernet traffic through an HTTP
proxy cache such as Squid?
This is for building a fairly large mesh network on amateur radio with
some links having limited bandwidth. To improve performance a proxy
cache would be installed inside each node, which stores to cache any
HTTP responses tagged as cacheable and sniffs for HTTP requests
through said switch for requests matching any cache entry. It then
blocks the request from being forwarded and responds to the request
itself with the cached data.
I'm having difficulty figuring out how to get batman-adv to pass all
of its raw ethernet traffic (presumably with mesh headers removed)
through outside software such as Squid before performing its
switching.
Another consideration was ALFRED but it doesn't appear to be easily
integratable with existing software.
From: Linus Lüssing <ll(a)simonwunderlich.de>
It seems that due to a copy & paste error the void pointer
in batadv_choose_backbone_gw() is cast to the wrong type.
Fixing this by using "struct batadv_bla_backbone_gw" instead of "struct
batadv_bla_claim" which better matches the caller's side.
For now it seems that we were lucky because the two structs both have
their orig/vid and addr/vid in the beginning. However I stumbled over
this issue when I was trying to add some debug variables in front of
"orig" in batadv_backbone_gw, which caused hash lookups to fail.
Fixes: 7e15c9305ce0 ("batman-adv: don't rely on positions in struct for hashing")
Signed-off-by: Linus Lüssing <ll(a)simonwunderlich.de>
---
net/batman-adv/bridge_loop_avoidance.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index b643dadc..4ba984bf 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -88,11 +88,12 @@ static inline u32 batadv_choose_claim(const void *data, u32 size)
*/
static inline u32 batadv_choose_backbone_gw(const void *data, u32 size)
{
- const struct batadv_bla_claim *claim = (struct batadv_bla_claim *)data;
+ const struct batadv_bla_backbone_gw *gw;
u32 hash = 0;
- hash = jhash(&claim->addr, sizeof(claim->addr), hash);
- hash = jhash(&claim->vid, sizeof(claim->vid), hash);
+ gw = (struct batadv_bla_backbone_gw *)data;
+ hash = jhash(&gw->orig, sizeof(gw->orig), hash);
+ hash = jhash(&gw->vid, sizeof(gw->vid), hash);
return hash % size;
}
--
2.28.0.rc1
Hi David,
here is a small cleanup pull request of batman-adv to go into net-next.
Please pull or let me know of any problem!
Thank you,
Simon
The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5:
Linux 5.9-rc1 (2020-08-16 13:04:57 -0700)
are available in the Git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-next-for-davem-20200824
for you to fetch changes up to 0093870aa891594d170e1dc9aa192a30d530d755:
batman-adv: Migrate to linux/prandom.h (2020-08-18 19:39:54 +0200)
----------------------------------------------------------------
This cleanup patchset includes the following patches:
- bump version strings, by Simon Wunderlich
- Drop unused function batadv_hardif_remove_interfaces(),
by Sven Eckelmann
- delete duplicated words, by Randy Dunlap
- Drop (even more) repeated words in comments, by Sven Eckelmann
- Migrate to linux/prandom.h, by Sven Eckelmann
----------------------------------------------------------------
Randy Dunlap (1):
batman-adv: types.h: delete duplicated words
Simon Wunderlich (1):
batman-adv: Start new development cycle
Sven Eckelmann (3):
batman-adv: Drop unused function batadv_hardif_remove_interfaces()
batman-adv: Drop repeated words in comments
batman-adv: Migrate to linux/prandom.h
net/batman-adv/bat_iv_ogm.c | 1 +
net/batman-adv/bat_v_elp.c | 1 +
net/batman-adv/bat_v_ogm.c | 1 +
net/batman-adv/bridge_loop_avoidance.c | 2 +-
net/batman-adv/fragmentation.c | 2 +-
net/batman-adv/hard-interface.c | 19 +------------------
net/batman-adv/hard-interface.h | 1 -
net/batman-adv/main.c | 1 -
net/batman-adv/main.h | 2 +-
net/batman-adv/multicast.c | 2 +-
net/batman-adv/network-coding.c | 4 ++--
net/batman-adv/send.c | 2 +-
net/batman-adv/soft-interface.c | 4 ++--
net/batman-adv/types.h | 4 ++--
14 files changed, 15 insertions(+), 31 deletions(-)
Hi David,
here are some bugfixes which we would like to have integrated into net.
Please pull or let me know of any problem!
Thank you,
Simon
The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5:
Linux 5.9-rc1 (2020-08-16 13:04:57 -0700)
are available in the Git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-net-for-davem-20200824
for you to fetch changes up to 279e89b2281af3b1a9f04906e157992c19c9f163:
batman-adv: bla: use netif_rx_ni when not in interrupt context (2020-08-18 19:40:03 +0200)
----------------------------------------------------------------
Here are some batman-adv bugfixes:
- Avoid uninitialized memory access when handling DHCP, by Sven Eckelmann
- Fix check for own OGM in OGM receive handler, by Linus Luessing
- Fix netif_rx access for non-interrupt context in BLA, by Jussi Kivilinna
----------------------------------------------------------------
Jussi Kivilinna (1):
batman-adv: bla: use netif_rx_ni when not in interrupt context
Linus Lüssing (1):
batman-adv: Fix own OGM check in aggregated OGMs
Sven Eckelmann (1):
batman-adv: Avoid uninitialized chaddr when handling DHCP
net/batman-adv/bat_v_ogm.c | 11 ++++++-----
net/batman-adv/bridge_loop_avoidance.c | 5 ++++-
net/batman-adv/gateway_client.c | 6 ++++--
3 files changed, 14 insertions(+), 8 deletions(-)