From 24470b42b36a44dbd94d9cf28a166a02fb2eb58a Mon Sep 17 00:00:00 2001 From: Stuart McLaren Date: Fri, 4 Dec 2026 14:45:19 +0000 Subject: conf: Make --splice-only and --fd mutually exclusive The --fd option passes in a pre-opened fd carrying layer 2 traffic (tap datapath). In splice-only mode that datapath is unusable: with L2 buffers no longer initialised, traffic from the fd is silently dropped. Reject the combination. Link: https://archives.passt.top/passt-dev/20261203175624.3078368-1-stuart.mclaren@hpe.com/ Signed-off-by: Stuart McLaren Signed-off-by: Stefano Brivio --- conf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf.c b/conf.c index 925b94d..51bfb5a 100644 --- a/conf.c +++ b/conf.c @@ -2170,6 +2170,9 @@ void conf(struct ctx *c, int argc, char **argv) if (c->no_splice) die("--splice-only is incompatible with --no-splice"); + if (c->fd_tap != -1) + die("--splice-only is incompatible with --fd"); + c->host_lo_to_ns_lo = 1; c->no_icmp = 1; c->no_dns = 1; -- cgit v1.2.3