0004-batman-adv-Fix-speedy-join-in-gateway-client-mode.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From: Sven Eckelmann <sven@narfation.org>
  2. Date: Fri, 17 Jun 2016 15:54:03 +0200
  3. Subject: batman-adv: Fix speedy join in gateway client mode
  4. Speedy join only works when the received packet is either broadcast or an
  5. 4addr unicast packet. Thus packets converted from broadcast to unicast via
  6. the gateway handling code have to be converted to 4addr packets to allow
  7. the receiving gateway server to add the sender address as temporary entry
  8. to the translation table.
  9. Not doing it will make the batman-adv gateway server drop the DHCP response
  10. in many situations because it doesn't yet have the TT entry for the
  11. destination of the DHCP response.
  12. Signed-off-by: Sven Eckelmann <sven@narfation.org>
  13. diff --git a/batman-adv/patches/0001-batman-adv-Fix-speedy-join-in-gateway-client-mode.patch b/batman-adv/patches/0001-batman-adv-Fix-speedy-join-in-gateway-client-mode.patch
  14. new file mode 100644
  15. index 0000000..e63b782
  16. --- /dev/null
  17. +++ b/batman-adv/patches/0001-batman-adv-Fix-speedy-join-in-gateway-client-mode.patch
  18. @@ -0,0 +1,35 @@
  19. +From: Sven Eckelmann <sven@narfation.org>
  20. +Date: Sun, 12 Jun 2016 10:43:19 +0200
  21. +Subject: [PATCH] batman-adv: Fix speedy join in gateway client mode
  22. +
  23. +Speedy join only works when the received packet is either broadcast or an
  24. +4addr unicast packet. Thus packets converted from broadcast to unicast via
  25. +the gateway handling code have to be converted to 4addr packets to allow
  26. +the receiving gateway server to add the sender address as temporary entry
  27. +to the translation table.
  28. +
  29. +Not doing it will make the batman-adv gateway server drop the DHCP response
  30. +in many situations because it doesn't yet have the TT entry for the
  31. +destination of the DHCP response.
  32. +
  33. +Fixes: 9cbc67d9da47 ("batman-adv: change interface_rx to get orig node")
  34. +Signed-off-by: Sven Eckelmann <sven@narfation.org>
  35. +---
  36. + net/batman-adv/send.c | 4 ++--
  37. + 1 file changed, 2 insertions(+), 2 deletions(-)
  38. +
  39. +diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
  40. +index f2f1256..0103976 100644
  41. +--- a/net/batman-adv/send.c
  42. ++++ b/net/batman-adv/send.c
  43. +@@ -424,8 +424,8 @@ int batadv_send_skb_via_gw(struct batadv_priv *bat_priv, struct sk_buff *skb,
  44. + struct batadv_orig_node *orig_node;
  45. +
  46. + orig_node = batadv_gw_get_selected_orig(bat_priv);
  47. +- return batadv_send_skb_unicast(bat_priv, skb, BATADV_UNICAST, 0,
  48. +- orig_node, vid);
  49. ++ return batadv_send_skb_unicast(bat_priv, skb, BATADV_UNICAST_4ADDR,
  50. ++ BATADV_P_DATA, orig_node, vid);
  51. + }
  52. +
  53. + void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface)