From mboxrd@z Thu Jan 1 00:00:00 1970 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 6AD1F5A004F for ; Wed, 07 Aug 2024 11:11:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723021890; 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: in-reply-to:in-reply-to:references:references; bh=WBkTHVrvhkUPBp6PB/pntApT1GkxHczZBftIog1Vd0E=; b=B1fO4k2bDJOECAB+d6S1bPOgUE7A0eNbVSks9CeuLKHFiPzv2BAvYLoGci7VPdioY1imxB puylR0dGIa3C2gY+0a5rJ0VRbiBw/Nprn8Bt9WKqn64I3KF86ubZPP4gIITKnXZu9JMtul nPMTTRphns3eH9nSpMCFWDnMZqX81mU= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-316-MmFn2W9COWuUf7VoztlPuw-1; Wed, 07 Aug 2024 05:11:28 -0400 X-MC-Unique: MmFn2W9COWuUf7VoztlPuw-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4280645e3e0so11465345e9.1 for ; Wed, 07 Aug 2024 02:11:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723021887; x=1723626687; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WBkTHVrvhkUPBp6PB/pntApT1GkxHczZBftIog1Vd0E=; b=qbUjfhovQ6HyfIUKW1HccpOpWCh/sI/TlEp118abCKP2W5ral2Y+9iUbdgF5+o1UEb 5SC18M01U8gLUcl6tL8cVUqEXx+TGvlPkSUvj2LmiUUEDxjSvmBJ0bBbu8iVt9vuI0Xt H0VLC31vFC+iAieYFZmgNkz8fOhKLNrS1EGaBNkF2jhwOY4YKjAfEWvFwPpwJO2oA22k tMWMSJCNlp/HFSKKIvljClCGCgqh2iGrmgyXso4O89ZHAF5QfzPVhJzPj3lutU9OpX0O wLLLrac/xPzFnBBAOJGAynxsps/acvkW1zGAqeDluWW0B7GGMln2cZrt41FTrauygz3f pOIA== X-Forwarded-Encrypted: i=1; AJvYcCUnAqlBBTo/Z0t7XunaU5IuubGG9DbBIZS9HTTMMHwz4DKfSsOZ9dgqxHgFvr6ADnr/xIHVtGRJGwcFBIsQ5plVhqeq X-Gm-Message-State: AOJu0YwSRoORgIxic6ls1ss4sAxwUgWY2E4huVoH3iKfdZ01XA7OfdRT 3wWyDMCNNjJTjoF6FIcr50HC/cJOYRvmkmS2KbzFbK0wz9BIVWvyk1CRMZX6InnOPW9MupaYlvD Okl9sYk5t3qt8vD9M0Q80h+JlNXVs0bc7KSnVjowjbEaGgrSp71BIAZF6BQ== X-Received: by 2002:a05:600c:4f8d:b0:427:b995:5bd0 with SMTP id 5b1f17b1804b1-428e6b7c5a4mr128851405e9.23.1723021887018; Wed, 07 Aug 2024 02:11:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMeNbilpKVX0DTJ3GBdeEqHqBb5u6fjt7lTVM6Gbs7YILNaJy3I0LlL7mVPQuGKS+Wi11ySA== X-Received: by 2002:a05:600c:4f8d:b0:427:b995:5bd0 with SMTP id 5b1f17b1804b1-428e6b7c5a4mr128851105e9.23.1723021886339; Wed, 07 Aug 2024 02:11:26 -0700 (PDT) Received: from [192.168.188.25] ([80.243.52.136]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290597199fsm18958825e9.14.2024.08.07.02.11.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Aug 2024 02:11:25 -0700 (PDT) Message-ID: Date: Wed, 7 Aug 2024 11:11:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] conf, pasta: Make -g and -a skip route/addresses copy for matching IP version only To: Stefano Brivio , passt-dev@passt.top References: <20240806183822.547868-1-sbrivio@redhat.com> From: Paul Holzinger In-Reply-To: <20240806183822.547868-1-sbrivio@redhat.com> X-Mimecast-Spam-Score: 0 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: YOUIKSZT655GGVL6OF2TZPSGXSKOHPFF X-Message-ID-Hash: YOUIKSZT655GGVL6OF2TZPSGXSKOHPFF 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 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 06/08/2024 20:38, Stefano Brivio wrote: > Paul reports that setting IPv4 address and gateway manually, using > --address and --gateway, causes pasta to fail inserting IPv6 routes > in a setup where multiple, inter-dependent IPv6 routes are present > on the host. > > That's because, currently, any -g option implies --no-copy-routes > altogether, and any -a implies --no-copy-addrs. > > Limit this implication to the matching IP version, instead, by having > two copies of no_copy_routes and no_copy_addrs in the context > structure, separately for IPv4 and IPv6. > > While at it, change them to 'bool': we had them as 'int' because > getopt_long() used to set them directly, but it hasn't been the case > for a while already. > > Reported-by: Paul Holzinger > Signed-off-by: Stefano Brivio Tested-by: Paul Holzinger I got confused for a moment because `pasta --config-net ip -6 route` did not show any routes, well turns out the -6 was parsed by pasta so I had to do `pasta --config-net -- ip -6 route` and it works as expected now. > --- > conf.c | 32 ++++++++++++++++++++------------ > passt.1 | 4 ++-- > passt.h | 14 ++++++++++---- > pasta.c | 8 ++++---- > 4 files changed, 36 insertions(+), 22 deletions(-) > -- Paul Holzinger