On Sun, Oct 05, 2025 at 09:39:37AM -0400, Jon Maloy wrote: > > > On 2025-10-03 01:33, David Gibson wrote: > > On Thu, Oct 02, 2025 at 08:34:03PM -0400, Jon Maloy wrote: > > > > > > > > > Bug #120 asks us to use the true MAC addresses of LAN local > > > remote hosts, since some programs need this information. > > > These commits introduces this for ARP, NDP, UDP, TCP and > > > ICMP. > > > > I have a bunch of more detailed comments on the patches, but they're a > > bit confused, because for the earlier ones I hadn't read the whole > > series to get the whole context. > > > > There is a problem here in that you're not consistent about whether > > the neighbour table is indexed by host side addresses or guest side > > addresses. You'll mostly get away with this, because they're > > usually the same. But it will result in bugs on the edge cases. > > > > Having read the whole series now, I think it will be simplest to > > standardize on indexing by guest side addresses. That invalidates > > some of my earlier comments, but instead you'll need to use > > nat_inbound() when you populate the table from netlink updates. > > > > I think I agree. After all this is all about what we are showing the > guest in the form of IP and MAC addresses, so it is conceptually clearer. > > It doesn't change the implementation much, but it makes it easier > to understand which special cases we need to consider. Agreed. I think it will also make this easier to extend for guest-side ARP lookups in future, which we'll want for handling multiple guests. > See my next email. -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson