From patchwork Fri Feb 12 10:35:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 5031 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=79.140.42.25; helo=mail.mail.packetmixer.de; envelope-from=sw@simonwunderlich.de; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=simonwunderlich.de Received: from mail.mail.packetmixer.de (packetmixer.de [79.140.42.25]) by open-mesh.org (Postfix) with ESMTPS id 5203E80578 for ; Fri, 12 Feb 2016 11:35:56 +0100 (CET) Received: from kero.packetmixer.de (p549BD5C9.dip0.t-ipconnect.de [84.155.213.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.mail.packetmixer.de (Postfix) with ESMTPSA id 80193174002; Fri, 12 Feb 2016 11:35:56 +0100 (CET) From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 12 Feb 2016 11:35:35 +0100 Message-Id: <1455273335-27063-1-git-send-email-sw@simonwunderlich.de> X-Mailer: git-send-email 2.7.0 Cc: Simon Wunderlich Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: fix logic error in batadv_v_ogm_forward 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: , X-List-Received-Date: Fri, 12 Feb 2016 10:35:56 -0000 From: Simon Wunderlich My latest restructure attempt of the BATMAN v forward function introduced a regression, causing kernel crashes when an OGM is forwarded. This patch fixes it. Fixes: 30c96bc787 ("batman-adv: move and restructure batadv_v_ogm_forward") Reported-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Tested-by: Sven Eckelmann --- net/batman-adv/bat_v_ogm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c index 1b2399e..4155fa5 100644 --- a/net/batman-adv/bat_v_ogm.c +++ b/net/batman-adv/bat_v_ogm.c @@ -309,7 +309,7 @@ static void batadv_v_ogm_forward(struct batadv_priv *bat_priv, u16 tvlv_len; /* only forward for specific interfaces, not for the default one. */ - if (if_outgoing != BATADV_IF_DEFAULT) + if (if_outgoing == BATADV_IF_DEFAULT) goto out; orig_ifinfo = batadv_orig_ifinfo_new(orig_node, if_outgoing);