From owner-freebsd-net@freebsd.org Tue Oct 13 08:18:39 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 30FFC4397D9 for ; Tue, 13 Oct 2020 08:18:39 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C9T2k1Jkqz4Pvb for ; Tue, 13 Oct 2020 08:18:37 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (120.89-11-192.nextgentel.com [89.11.192.120]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D173D26024C; Tue, 13 Oct 2020 10:18:35 +0200 (CEST) Subject: Re: ims_merge in in_mcast.c To: Dheeraj Kandula , freebsd-net@freebsd.org References: From: Hans Petter Selasky Message-ID: <5f8b19d0-f833-0566-2336-d75ce0881ffa@selasky.org> Date: Tue, 13 Oct 2020 10:18:00 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4C9T2k1Jkqz4Pvb X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-2.37 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-0.96)[-0.958]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.22)[-0.223]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-0.88)[-0.885]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-net] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2020 08:18:39 -0000 On 2020-10-12 19:11, Dheeraj Kandula wrote: > On line 987 and 991 shouldn't the index be 0 instead of 1. > > i.e. ims->ims_st[0].ex -= n; > and > ims->ims_st[0].in -= n; > > On a rollback, the entry at index 0 is incremented and the entry at index 1 > is decremented. > > On a non-rollback merge, the entry at index 0 is decremented and the entry > at index 1 is incremented. Hi, If you look at inm_commit() you see that [0] is overwritten by [1], so I believe the current code is correct. Same goes for both IPv4 and IPv6. Are you seeing an issue with multicast investigating this issue? --HPS