From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio To: passt-dev@passt.top Subject: Re: [PATCH v2 0/8] Clean up and fix bugs in port forwarding data structures Date: Sat, 24 Sep 2022 22:25:23 +0200 Message-ID: <20220924222523.30b091fc@elisabeth> In-Reply-To: <20220924090823.1873052-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1281116762254966991==" --===============1281116762254966991== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Sat, 24 Sep 2022 19:08:15 +1000 David Gibson wrote: > The information we need to keep track of which ports are forwarded > where is currently split across several different values and data > structures in several different places. Worse, a number of those > structures are incorrectly sized due to an off by one error, which > could lead to buffer overruns. > > Fix the sizing, and re-organize the data structures in a way that > should make it less likely to repeat that mistake. > > While we're there, correct a similar off-by-one mis-sizing of a number > of other arrays. > > Changes since v1: > * Use a define for the array size, rather than a typedef to handle > the bitmaps of ports > > David Gibson (8): > Improve types and names for port forwarding configuration > Consolidate port forwarding configuration into a common structure > udp: Delay initialization of UDP reversed port mapping table > Don't use indirect remap functions for conf_ports() > Pass entire port forwarding configuration substructure to conf_ports() > Treat port numbers as unsigned > Fix widespread off-by-one error dealing with port numbers > icmp: Correct off by one errors dealing with number of echo request > ids Applied now. -- Stefano --===============1281116762254966991==--