From patchwork Fri Aug 20 15:38:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 308 Return-Path: Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by open-mesh.net (Postfix) with SMTP id 330ED154534 for ; Fri, 20 Aug 2010 17:38:40 +0200 (CEST) Received: (qmail invoked by alias); 20 Aug 2010 15:38:39 -0000 Received: from i59F6A0EB.versanet.de (EHLO sven-desktop.lazhur.ath.cx) [89.246.160.235] by mail.gmx.net (mp017) with SMTP; 20 Aug 2010 17:38:39 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX1/YApt4qprYSotCI9Jscm1C7UcA244YUTB9yeJpy9 zwPH1NX6/mxY6e From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 20 Aug 2010 17:38:35 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.34-1-amd64; KDE/4.4.5; x86_64; ; ) References: <4C6B80D2.9040906@web.de> <4C6E8B79.7040801@web.de> <201008201644.58520.sven.eckelmann@gmx.de> In-Reply-To: <201008201644.58520.sven.eckelmann@gmx.de> MIME-Version: 1.0 Message-Id: <201008201738.37057.sven.eckelmann@gmx.de> X-Y-GMX-Trusted: 0 Cc: Tim , b.a.t.m.a.n@lists.open-mesh.net Subject: Re: [B.A.T.M.A.N.] Problem openWRT "backfire" and "kmod-batman-adv" X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking 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, 20 Aug 2010 15:38:41 -0000 Sven Eckelmann wrote: > I haven't wrote that code... so it may take a little bit until I feel in > the right mood to hunt it real down. Ok, could you please try the attached patch? Just add it to the other patches (you can omit 03-... after a successful test. But it may reveal interesting information if that wasn't the actual problem). Don't forget to cleanup your openwrt build environment. Best regards, Sven diff --git a/hard-interface.c b/hard-interface.c index 60e8a56..65a4a54 100644 --- a/hard-interface.c +++ b/hard-interface.c @@ -129,6 +129,9 @@ static bool hardif_is_iface_up(struct batman_if *batman_if) static void update_mac_addresses(struct batman_if *batman_if) { + if (!batman_if || !batman_if->packet_buff) + return; + addr_to_string(batman_if->addr_str, batman_if->net_dev->dev_addr); memcpy(((struct batman_packet *)(batman_if->packet_buff))->orig, @@ -339,6 +342,7 @@ static struct batman_if *hardif_add_interface(struct net_device *net_dev) batman_if->if_num = -1; batman_if->net_dev = net_dev; batman_if->if_status = IF_NOT_IN_USE; + batman_if->packet_buff = NULL; INIT_LIST_HEAD(&batman_if->list); check_known_mac_addr(batman_if->net_dev->dev_addr);