From owner-freebsd-net@freebsd.org Fri Dec 1 11:34:01 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CC1EDFD1D9 for ; Fri, 1 Dec 2017 11:34:01 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2667D7DB64 for ; Fri, 1 Dec 2017 11:34:00 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vB1BXnvd003898 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 1 Dec 2017 12:33:50 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: sd@mostnet.ru Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vB1BXkOO048072; Fri, 1 Dec 2017 18:33:46 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: ng_patch is broken in 10.4-RELEASE To: Dmitry Selivanov , "freebsd-net@freebsd.org" References: <502ae893-1b55-305d-f1c4-de7f22159a15@mostnet.ru> From: Eugene Grosbein Message-ID: <5A213E1A.2080805@grosbein.net> Date: Fri, 1 Dec 2017 18:33:46 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <502ae893-1b55-305d-f1c4-de7f22159a15@mostnet.ru> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2017 11:34:01 -0000 On 01.12.2017 16:39, Dmitry Selivanov wrote: > #ngctl mkpeer ipfw: patch 7 in > #ngctl name ipfw:7 tcp_rst > #ngctl connect ipfw: tcp_rst: 8 out > #ngctl msg tcp_rst: setconfig { count=1 csum_flags=0 ops=[ { mode=8 value=4 length=1 offset=33 } ] } > ngctl: send msg: Argument list too long > > It's broken after r309389 and could be fixed in r309408, but the first one went to 10.4 and the second one didn't. > > 11.0 didn't get this patches, 11.1 got both, so they are OK. > > Patch to fix: > --- /sys/netgraph/ng_patch.h.orig 2017-11-23 14:19:54.019040000 +0300 > +++ /sys/netgraph/ng_patch.h 2017-11-30 15:34:23.000000000 +0300 > @@ -80,7 +80,7 @@ > > struct ng_patch_config { > uint32_t count; > - uint32_t csum_flags; > + uint64_t csum_flags; > struct ng_patch_op ops[]; > }; > > > In this patch new uint64_t type is utilized. Instead this you can get back modified "csum_flags" to ng_parse_uint32_type in NG_PATCH_CONFIG_TYPE_INFO, which was changed in r309389. > Patch and rebuild ng_patch module. А можно всё то же самое оформить в виде PR в http://bugs.freebsd.org/ и прислать мне ссылку? Займусь.