From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=dfQnCHbE; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 224595A0280 for ; Sun, 29 Jun 2025 19:13:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1751217233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nWHTS9q/CRpnNpCvLYSjFgDDUtvP2cXO8jQTCwqJD/k=; b=dfQnCHbEVJifzdysjBmV5RFLJgCP54p7aSO0t+GX5R1+KXGachjWJevgRE1MNXgxH7zvqG ikJelBkqB38X9KJIbkdwfC33jwbWWJdkUfCQSmJ8VF+pGUbGMsBQu8rCzFVZLWgjR55096 b0bU1Oj1Nb98VxgHjsJXNfc73pRwyHw= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-9-YOQSn_3gPjmqaRzSSyzBoQ-1; Sun, 29 Jun 2025 13:13:52 -0400 X-MC-Unique: YOQSn_3gPjmqaRzSSyzBoQ-1 X-Mimecast-MFC-AGG-ID: YOQSn_3gPjmqaRzSSyzBoQ_1751217231 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E8828180047F; Sun, 29 Jun 2025 17:13:50 +0000 (UTC) Received: from jmaloy-thinkpadp16vgen1.rmtcaqc.csb (unknown [10.22.64.73]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B641F195609D; Sun, 29 Jun 2025 17:13:48 +0000 (UTC) From: Jon Maloy To: sbrivio@redhat.com, dgibson@redhat.com, david@gibson.dropbear.id.au, jmaloy@redhat.com, passt-dev@passt.top Subject: [PATCH v3 0/8] use true MAC address of LAN local remote hosts Date: Sun, 29 Jun 2025 13:13:39 -0400 Message-ID: <20250629171348.86323-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 1gtilNfhnR3Hs9iFK-gZJK5QO9IRk-ljNpwz4lw-k3k_1751217231 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID-Hash: K5YEX3EGESTM7NIPS2IU6EDO5XDPBLUU X-Message-ID-Hash: K5YEX3EGESTM7NIPS2IU6EDO5XDPBLUU X-MailFrom: jmaloy@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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. --- v3: Updated according to feedback from Stefano and David: - Made the ARP/NDP lookup call filter out the requested address by itself, qualified by the index if the template interface - Moved the flow specific MAC address from struct flowside to struct flow_common. Jon Maloy (8): netlink: Add function to extract MAC addresses from NDP/ARP table arp/ndp: respond with true MAC address of LAN local remote hosts flow: add MAC address of LAN local remote hosts to flow udp: forward external source MAC address through tap interface tcp: forward external source MAC address through tap interface tap: change signature of function tap_push_l2h() tcp: make tcp_rst_no_conn() respond with correct MAC address icmp: let icmp use mac address from flowside structure arp.c | 9 ++++++++ flow.c | 21 ++++++++++++++++- flow.h | 2 ++ fwd.c | 2 +- fwd.h | 3 ++- icmp.c | 4 ++-- inany.c | 15 ++++++++++++ inany.h | 1 + ndp.c | 11 ++++++++- netlink.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ netlink.h | 2 ++ tap.c | 24 +++++++++++-------- tap.h | 7 +++--- tcp.c | 22 +++++++++++++++--- tcp_buf.c | 27 +++++++++++----------- tcp_internal.h | 2 +- tcp_vu.c | 5 ++-- udp.c | 49 +++++++++++++++++++++------------------ 18 files changed, 207 insertions(+), 61 deletions(-) -- 2.48.1