From patchwork Sun Jun 12 08:43:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16376 X-Patchwork-Delegate: mareklindner@neomailbox.ch Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 3450B81BD7; Sun, 12 Jun 2016 10:43:27 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=prmtJ7pF; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id CB66581BD4 for ; Sun, 12 Jun 2016 10:43:25 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p4FCB2AF6.dip0.t-ipconnect.de [79.203.42.246]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 45FCB1100E8; Sun, 12 Jun 2016 10:43:25 +0200 (CEST) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1465721005; bh=jKeu+hLwg1mphQCQvz2GAe3kuk6iO9akECvDAOAELTw=; h=From:To:Cc:Subject:Date:From; b=prmtJ7pFux/Wfo3v7anvB6AgYuvDx595Fbj1LKvdzqo5RQk1RoRgM6M3TXaqyOj0I wjr0OLnee1Xdh4sLp836XF/U8EJiqUFN5VLRYJ919NF4GfEvTUG9MINvkc9Yc693C0 qfclVrlWrKHS+A1fIi18/aZbfGYE3X/LdZZt1pPU= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 12 Jun 2016 10:43:19 +0200 Message-Id: <1465721000-9174-1-git-send-email-sven@narfation.org> X-Mailer: git-send-email 2.8.1 Subject: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix speedy join in gateway client mode X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" Speedy join only works when the received packet is either broadcast or an 4addr unicast packet. Thus packets converted from broadcast to unicast via the gateway handling code have to be converted to 4addr packets to allow the receiving gateway server to add the sender address as temporary entry to the translation table. Not doing it will make the batman-adv gateway server drop the DHCP response in many situations because it doesn't yet have the TT entry for the destination of the DHCP response. Fixes: 9cbc67d9da47 ("batman-adv: change interface_rx to get orig node") Signed-off-by: Sven Eckelmann Acked-by: Antonio Quartulli --- net/batman-adv/send.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c index 49836da..0e9445b 100644 --- a/net/batman-adv/send.c +++ b/net/batman-adv/send.c @@ -426,8 +426,8 @@ int batadv_send_skb_via_gw(struct batadv_priv *bat_priv, struct sk_buff *skb, struct batadv_orig_node *orig_node; orig_node = batadv_gw_get_selected_orig(bat_priv); - return batadv_send_skb_unicast(bat_priv, skb, BATADV_UNICAST, 0, - orig_node, vid); + return batadv_send_skb_unicast(bat_priv, skb, BATADV_UNICAST_4ADDR, + BATADV_P_DATA, orig_node, vid); } void batadv_forw_packet_free(struct batadv_forw_packet *forw_packet)