From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Apr 25 09:10:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94261922 for ; Fri, 25 Apr 2014 09:10:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70EFE167F for ; Fri, 25 Apr 2014 09:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3P9A00V032009 for ; Fri, 25 Apr 2014 09:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3P9A0ri032008; Fri, 25 Apr 2014 09:10:00 GMT (envelope-from gnats) Resent-Date: Fri, 25 Apr 2014 09:10:00 GMT Resent-Message-Id: <201404250910.s3P9A0ri032008@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Perezhilin Yuri Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E582479D for ; Fri, 25 Apr 2014 09:03:44 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D25C3163A for ; Fri, 25 Apr 2014 09:03:44 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s3P93idS090073 for ; Fri, 25 Apr 2014 09:03:44 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s3P93i0E090059; Fri, 25 Apr 2014 09:03:44 GMT (envelope-from nobody) Message-Id: <201404250903.s3P93i0E090059@cgiserv.freebsd.org> Date: Fri, 25 Apr 2014 09:03:44 GMT From: Perezhilin Yuri To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/188987: net/igmpproxy: kernel structure ip bugfix X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 09:10:00 -0000 >Number: 188987 >Category: ports >Synopsis: net/igmpproxy: kernel structure ip bugfix >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 25 09:10:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Perezhilin Yuri >Release: 10.0-RELEASE >Organization: dnlab.ru >Environment: FreeBSD gw.ps-ax.ru 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: In FreeBSD 9.0 was been a lot of changes in struct ip {...}. In version 900044 field ip->ip_len has been changed to carry all length of packet (previosly it was be length without header's length), and all program, which use ip->ip_len, must be corrected. Unfortunately, igmpproxy doesn't update from 2009 year and don't work on FreeBSD 9/10. If you try to use igmpproxy now, /var/log/message you can see : Apr 25 01:14:31 gw igmpproxy[68438]: received packet from 192.168.199.206 shorter (28 bytes) than hdr+data length (20+7148) Apr 25 01:14:31 gw igmpproxy[68438]: received packet from 192.168.199.206 shorter (28 bytes) than hdr+data length (20+7148) Apr 25 01:14:41 gw igmpproxy[68438]: received packet from 192.168.199.10 shorter (32 bytes) than hdr+data length (24+8168) Apr 25 01:14:44 gw igmpproxy[68438]: received packet from 192.168.199.206 shorter (28 bytes) than hdr+data length (20+7148) Apr 25 01:14:45 gw igmpproxy[68438]: received packet from 192.168.199.206 shorter (28 bytes) than hdr+data length (20+7148) >How-To-Repeat: Install and try to use >Fix: Patch attached with submission follows: --- src/os-freebsd.h.orig 2009-10-05 22:07:06.000000000 +0400 +++ src/os-freebsd.h 2014-04-25 01:58:41.592218315 +0400 @@ -14,9 +14,12 @@ static inline u_short ip_data_len(const struct ip *ip) { - return ip->ip_len; +#if __FreeBSD_version >= 900044 + return ip->ip_len - (ip->ip_hl << 2); +#else + return ip->ip_len; +#endif } - static inline void ip_set_len(struct ip *ip, u_short len) { ip->ip_len = len; >Release-Note: >Audit-Trail: >Unformatted: