From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none 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=QdH9kMoG; 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 ESMTP id B158A5A061A for ; Tue, 26 Nov 2024 14:49:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732628966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zYrxNXGzw0oZtxaemVmirb53xOHcXs4Dsx4F9HmTc0w=; b=QdH9kMoGLdwg+pFnsK9OZxjdri2j/CxnrlCyKkMGf1lsY49PiV5RpD7EIbObxrkWMI1cqp /FVPBcKQksCpkHOcrDJQn0UyK4tH1MpM4ahtXYHPzcR6W8XDNFgpZgJ+hZJehy+amVMnoE GUMp0b+ZdPtWmJGDDcuWLHNWGtWAvD4= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-682-ZK9te7JBMP6rhPFT_4_b2Q-1; Tue, 26 Nov 2024 08:49:25 -0500 X-MC-Unique: ZK9te7JBMP6rhPFT_4_b2Q-1 X-Mimecast-MFC-AGG-ID: ZK9te7JBMP6rhPFT_4_b2Q Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4349d895ef8so24719965e9.0 for ; Tue, 26 Nov 2024 05:49:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732628964; x=1733233764; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zYrxNXGzw0oZtxaemVmirb53xOHcXs4Dsx4F9HmTc0w=; b=ECEbQ65iT6zB3Zfgfvyo1hxOb4IfnmDj7jjZkrqBB25eJst5gVaHx760xVZbiUFDwv r8R93qwZHwzePs0UGUn2oB0Rvd8hjy87WvWCJHzlWc/geY1DWsjCEkN3OWdUMU/PfP6r MGSjah7B8mPOCc5D8LHW/HV6d4Ix68cMevw+uskXzRNQ/ac5YKv1/dVr+72rzK5cvWpc 4OIQVbvX69hSvua/0Teq/uIadiUJ1eFHZXcBep82CqyD0Q8cig1b1QYFy5GEP7xaIA1Z 51GEBanju46p+7V7ktjT5O59WbjclCTxAkp4iUThF+IVP/KuzwXHpCkCjian14YMc14g HjCA== X-Forwarded-Encrypted: i=1; AJvYcCX/DltIQnQmKrZVXPEroKmE1UZh8JzuropjghGB0nc59UqTwUHmCcnjBB2sCyjCOi268vvSfd2fUpw=@passt.top X-Gm-Message-State: AOJu0Yw9y0pti7wzVvnUFeGLAjcJuhBqO73l7HvowdH7SPGRrMNxeIpt MQAww7FBrtkINomdKVaXD3Nru/zlWQMNVDU3fUNrzSx7wMoEDy+8kd/PiqFGvsDJWkCqjRGT7mN UNNbKbSoUuIJPU8RAYIvVL1ps04V0pzpLwKlF7yfYVKmIGMBvuQ== X-Gm-Gg: ASbGncummC0n4XzPPy7pdU7OJrq3VAN7/90Fq2roJ+ptMbR3Kw4zYLUMpn4qHz0wsMp uRTA0PONs/fYNBJ2aQX5Vx+JoQtQ97XAaQFn8m4uu22CTCA6GuIo/Kfq56uizj6LXsLvTmwMRKl HWnyCj+NVmCrRLAB9hoq3lRBJaVKAWFRHxXOXFdkpBendwGzoqo9V1DQHaEumbUmZgEKaiRttU1 p7hO1VpvqnJzdqX8UV3vaRqyef/8lNFkNgW4E5VFkIBdTLVqqiUUnA= X-Received: by 2002:a05:600c:45cf:b0:434:a8ef:442e with SMTP id 5b1f17b1804b1-434a8ef45c1mr9919585e9.31.1732628964019; Tue, 26 Nov 2024 05:49:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFj6U1j6ZzB39UBMtTqfc1Y9ghpsVZEGIqlbxYHtHtupS22wZxqgEpKJQD9w9xCKw0EVeluow== X-Received: by 2002:a05:600c:45cf:b0:434:a8ef:442e with SMTP id 5b1f17b1804b1-434a8ef45c1mr9919305e9.31.1732628963514; Tue, 26 Nov 2024 05:49:23 -0800 (PST) Received: from [192.168.188.25] ([80.243.52.133]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fbe901esm13550372f8f.87.2024.11.26.05.49.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Nov 2024 05:49:22 -0800 (PST) Message-ID: Date: Tue, 26 Nov 2024 14:49:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] treewide: Introduce 'local mode' for disconnected setups To: Stefano Brivio , passt-dev@passt.top References: <20241126055429.1610735-1-sbrivio@redhat.com> From: Paul Holzinger In-Reply-To: <20241126055429.1610735-1-sbrivio@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: VGX-MrZiTNv7djED61SnmJOgt2lefNGg3yRu7FFzsgo_1732628964 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: I245YERV66Y32OHNW3NWUMTA6E7IU32C X-Message-ID-Hash: I245YERV66Y32OHNW3NWUMTA6E7IU32C X-MailFrom: pholzing@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 CC: David Gibson 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: On 26/11/2024 06:54, Stefano Brivio wrote: > There are setups where no host interface is available or configured > at all, intentionally or not, temporarily or not, but users expect > (Podman) containers to run in any case as they did with slirp4netns, > and we're now getting reports that we broke such setups at a rather > alarming rate. > > To this end, if we don't find any usable host interface, instead of > exiting: > > - for IPv4, use 169.254.2.1 as guest/container address and 169.254.2.2 > as default gateway > > - for IPv6, don't assign any address (forcibly disable DHCPv6), and > use the *first* link-local address we observe to represent the > guest/container. Advertise fe80::1 as default gateway > > - use 'tap0' as default interface name for pasta > > Change ifi4 and ifi6 in struct ctx to int and accept a special -1 > value meaning that no host interface was selected, but the IP family > is enabled. The fact that the kernel uses unsigned int values for > those is not an issue as 1. one can't create so many interfaces > anyway and 2. we otherwise handle those values transparently. > > Fix a botched conditional in conf_print() to actually skip printing > DHCPv6 information if DHCPv6 is disabled (and skip printing NDP > information if NDP is disabled). > > Link: https://github.com/containers/podman/issues/24614 > Signed-off-by: Stefano Brivio Tested-by: Paul Holzinger As mentioned on IRC I noticed a problem in Podman with this as we ignore link local addresses when adding host entries but that is a Podman bug and must be fixed there. -- Paul Holzinger