aboutgitcodebugslistschat
path: root/checksum.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2024-04-25 07:11:55 +0200
committerStefano Brivio <sbrivio@redhat.com>2024-04-26 07:46:42 +0200
commitbfc83b54c43bed241282365d29d3ecd34ef88e8e (patch)
treeab6c10dd34da0c470582bbd82f44af496f76a48b /checksum.h
parentff2ff2fbca75352ff027a90d6341645f1dea4e50 (diff)
downloadpasst-bfc83b54c43bed241282365d29d3ecd34ef88e8e.tar
passt-bfc83b54c43bed241282365d29d3ecd34ef88e8e.tar.gz
passt-bfc83b54c43bed241282365d29d3ecd34ef88e8e.tar.bz2
passt-bfc83b54c43bed241282365d29d3ecd34ef88e8e.tar.lz
passt-bfc83b54c43bed241282365d29d3ecd34ef88e8e.tar.xz
passt-bfc83b54c43bed241282365d29d3ecd34ef88e8e.tar.zst
passt-bfc83b54c43bed241282365d29d3ecd34ef88e8e.zip
netlink: For IPv4, IFA_LOCAL is the interface address, not IFA_ADDRESS
See the comment to the unnamed enum in linux/if_addr.h, which currently states: /* * Important comment: * IFA_ADDRESS is prefix address, rather than local interface address. * It makes no difference for normally configured broadcast interfaces, * but for point-to-point IFA_ADDRESS is DESTINATION address, * local address is supplied in IFA_LOCAL attribute. * * [...] */ if we fetch IFA_ADDRESS, and we have a point-to-point link with a peer address configured, we'll source the peer address as "our" address, and refuse to resolve it in arp(). This was reported with pasta and a tun upstream interface configured by OpenVPN in "p2p" topology: the target namespace will have similar addresses and routes as the host, which is fine, and will try to resolve the point-to-point peer address (because it's the default gateway). Given that we configure it as our address (only internally, not visibly in the namespace), we'll fail to resolve that and traffic doesn't go anywhere. Note that this is not the case for IPv6: there, IFA_ADDRESS is the actual, local address of the interface, and IFA_LOCAL is not necessarily present, so the comment in linux/if_addr.h doesn't apply either. Link: https://github.com/containers/podman/issues/22320 Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'checksum.h')
0 files changed, 0 insertions, 0 deletions