From patchwork Sat Jul 1 14:58:00 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Maier X-Patchwork-Id: 12350 Received: from mailout1.informatik.tu-muenchen.de ([131.159.0.18]) by www.linuxtv.org with esmtp (Exim 4.50) id 1Fwgv2-00022k-Vz for vdr@linuxtv.org; Sat, 01 Jul 2006 16:58:01 +0200 Received: from panzerknacker (panzerknacker-wireless.ducktales.net [212.60.137.147]) by mail.in.tum.de (Postfix) with ESMTP id DE3F72748 for ; Sat, 1 Jul 2006 16:57:59 +0200 (MEST) Message-ID: <00f201c69d1e$c1bc2330$93893cd4@panzerknacker> From: "Patrick Maier" To: Date: Sat, 1 Jul 2006 16:58:00 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-Virus-Scanned: by amavisd-new/sophie/sophos at mailrelay1.informatik.tu-muenchen.de Subject: [vdr] Bug in SVDRP-hosts-parser X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2006 14:58:01 -0000 Status: O X-Status: X-Keywords: X-UID: 9992 Hi Klaus, i found a bug in the computing of the Netmask for the SVDRP-Hosts-file. The byte order in your case was not correctly computed. Here is a patch. ============= snip ========== Greets Patrick ============= snip ========== --- config.c.orig 2006-07-01 16:53:25.000000000 +0200 +++ config.c 2006-07-01 16:53:33.000000000 +0200 @@ -106,8 +106,10 @@ *(char *)p = 0; // yes, we know it's 'const' - will be restored! if (m == 0) mask = 0; - else - mask >>= (32 - m); + else { + mask <<= (32 - m); + mask = htonl(mask); + } } int result = inet_aton(s, &addr); if (p)