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=fZ4OpAZY; 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 93E575A0280 for ; Sat, 07 Jun 2025 03:11:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749258716; 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=eMEmwa7XT7+1ypL003C0HW5voS/+S8ZwhnjUnTRBQJ8=; b=fZ4OpAZYEM0Ca1AFDRNPT5f7m1C04g1HTK7zq1ZgqUXjJiEdanmFyVKuH21cm0YXUhDIZ8 MXw8eYgvhsEARJQDJNzSkHhsi2QnLaXNkDSU5QaOWQjxt4naVjUobi3q08uKB0slquafY2 Pk15EZOdAoZct2xkMfmsEWH92QjetnQ= Received: from mx-prod-mc-03.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-336-FH44ZAYtM5C25wEvLnfIUg-1; Fri, 06 Jun 2025 21:11:54 -0400 X-MC-Unique: FH44ZAYtM5C25wEvLnfIUg-1 X-Mimecast-MFC-AGG-ID: FH44ZAYtM5C25wEvLnfIUg_1749258714 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 21C9B19560B1 for ; Sat, 7 Jun 2025 01:11:54 +0000 (UTC) Received: from jmaloy-thinkpadp16vgen1.rmtcaqc.csb (unknown [10.22.80.87]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A3F3B18002B3; Sat, 7 Jun 2025 01:11:52 +0000 (UTC) From: Jon Maloy To: sbrivio@redhat.com, dgibson@redhat.com, jmaloy@redhat.com, passt-dev@passt.top Subject: [0/4] use true mac address of LAN local remote hosts Date: Fri, 6 Jun 2025 21:11:47 -0400 Message-ID: <20250607011151.3290866-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: IYTvSOUXrI2BgjhLb9tR2zRiDojmdz2W4DygqQaCFqM_1749258714 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: MOTBDLAXCF2DOKTVPGDTYIVQRTMEP2RC X-Message-ID-Hash: MOTBDLAXCF2DOKTVPGDTYIVQRTMEP2RC 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 use this information. These commits introduces this for ARP, NTP, UDP and TCP, while it is still missing for ICMP. Jon Maloy (4): netlink: Add function to extract mac addresses from arp table arp: respond with true mac address of LAN local remote hosts udp: forward external source mac address through tap interface tcp: forward external source mac address through tap interface arp.c | 9 ++++++++ flow.c | 13 ++++++++++- flow.h | 2 ++ fwd.c | 2 +- fwd.h | 3 ++- ndp.c | 11 ++++++++++ netlink.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ netlink.h | 1 + tcp.c | 5 ++++- tcp_buf.c | 27 +++++++++++------------ tcp_internal.h | 2 +- tcp_vu.c | 5 ++--- udp.c | 29 +++++++++++-------------- 13 files changed, 130 insertions(+), 38 deletions(-) -- 2.48.1