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=LcmAFcQ/; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id E68D35A0287 for ; Thu, 12 Jun 2025 06:21:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749702118; 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=KOY0EbjrWGa526VV9iC+SJfn3eWzWUTVJrp9TF6AZwc=; b=LcmAFcQ/iH2LgGJ/zJVXOg+HTVwGdge+1ZVdn9CI/z4CFT4p/u6assHB/mHOhdAgjyVC4q hv4vhNO26j4DPo7u+QubbIPO9/FII008xZ6bnoc8bKQjwsdiMn8hIp4kbp+e7oTLK48dAm 2XPOSbd2KIYkGOTMUMtqJRoirqdKEF0= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-368-rTRETFtWNae1jFZtwkrn9A-1; Thu, 12 Jun 2025 00:21:56 -0400 X-MC-Unique: rTRETFtWNae1jFZtwkrn9A-1 X-Mimecast-MFC-AGG-ID: rTRETFtWNae1jFZtwkrn9A_1749702115 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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5644C195608D for ; Thu, 12 Jun 2025 04:21:55 +0000 (UTC) Received: from jmaloy-thinkpadp16vgen1.rmtcaqc.csb (unknown [10.22.89.212]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0AF391956087; Thu, 12 Jun 2025 04:21:53 +0000 (UTC) From: Jon Maloy To: sbrivio@redhat.com, dgibson@redhat.com, jmaloy@redhat.com, passt-dev@passt.top Subject: [PATCH v2 0/8] use true mac address of LAN local remote hosts Date: Thu, 12 Jun 2025 00:21:44 -0400 Message-ID: <20250612042152.695879-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: 94Vn204e3DPQ8lw8DygzDwphgh7B9lMHkD0X6JU1qX0_1749702115 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID-Hash: 74KEN5KMOTWAPYZ7UDCQQVBUSODVF4K2 X-Message-ID-Hash: 74KEN5KMOTWAPYZ7UDCQQVBUSODVF4K2 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. Jon Maloy (8): netlink: Add function to extract mac addresses from arp table arp: 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 | 13 ++++++++++- flow.h | 2 ++ fwd.c | 2 +- fwd.h | 3 ++- icmp.c | 4 ++-- ndp.c | 13 ++++++++++- netlink.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ netlink.h | 1 + tap.c | 24 +++++++++++++-------- tap.h | 7 +++--- tcp.c | 20 ++++++++++++++--- tcp_buf.c | 27 +++++++++++------------ tcp_internal.h | 2 +- tcp_vu.c | 5 ++--- udp.c | 33 +++++++++++++--------------- 16 files changed, 166 insertions(+), 57 deletions(-) -- 2.48.1