From patchwork Wed Feb 6 14:39:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gui Iribarren via B.A.T.M.A.N" X-Patchwork-Id: 17760 X-Patchwork-Delegate: sw@simonwunderlich.de 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 C72E680BDF; Wed, 6 Feb 2019 15:46:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=open-mesh.org; s=20121; t=1549464411; i=@open-mesh.org; bh=pPQNixcKCpuNjlVd4p8ShLTxg8TL390rbMnLiYr/n6w=; h=To:Date:List-Id:List-Post:From:Cc:List-Subscribe:List-Unsubscribe: List-Archive:Reply-To:List-Help:Subject:From; b=q02pSIuoOGVEX45uieo/zkYqYaEX5VduWi+hGFjUvksbwvGcrDHT//In7FQPaEp72 jrno7c+yZWd9wpDazulKAOoHLh4JuyKTAS9vsXsG03CEGZ2wIkT6bePVi8FkoQzfLZ qvt/k+4QroG2u9jcW6RxZq31kBoZYzzfW9A3MjkI= To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 6 Feb 2019 15:39:14 +0100 MIME-Version: 1.0 Message-ID: List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Post: X-Patchwork-Original-From: "Martin Weinelt via B.A.T.M.A.N" From: "Gui Iribarren via B.A.T.M.A.N" Precedence: list Cc: Martin Weinelt X-Mailman-Version: 2.1.23 X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Help: Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: fix memory leak in in batadv_dat_put_dhcp Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. Consume the skb to avoid leaking memory. Fixes: 1fd1ce2d383f ("batman-adv: Snoop DHCPACKs for DAT") Signed-off-by: Martin Weinelt --- net/batman-adv/distributed-arp-table.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c index 899ab051..310a4f35 100644 --- a/net/batman-adv/distributed-arp-table.c +++ b/net/batman-adv/distributed-arp-table.c @@ -1711,6 +1711,8 @@ static void batadv_dat_put_dhcp(struct batadv_priv *bat_priv, u8 *chaddr, batadv_dat_send_data(bat_priv, skb, yiaddr, vid, BATADV_P_DAT_DHT_PUT); batadv_dat_send_data(bat_priv, skb, ip_dst, vid, BATADV_P_DAT_DHT_PUT); + consume_skb(skb); + batadv_dbg(BATADV_DBG_DAT, bat_priv, "Snooped from outgoing DHCPACK (server address): %pI4, %pM (vid: %i)\n", &ip_dst, hw_dst, batadv_print_vid(vid));