From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796065875; b=dQE2l/OiWQvNQiNW0UGvWAAqQwNED1A3NRZ1W15ZusQcGhdfXoW0mr/2yLP04Axnw7oQ dUPIbvCNAarUlqrAIbOCFi1YRp5NYe1snB57cLb8Crz6IuMpwtOIhgNtoFUUG+Zxbdvw9 ipcpg0enVhQy30j4YoMs1WlZi2mu6nmV/3cYXEXsyLTwDpfCi84UVmm8eZAmYHpzSiOer uE5wEn0+UjJl2O11x6NvHM1AeeL+exqgHHxK76jBM0EQDftQoheQNntr1B83nCv35ZjVj p/aoKMHzH+C9fJDfp06Tiwo2oNr96ta+R4KJ+ogygfvU9QAFHSi3YgDJnvrbu6ZJyzg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796065875; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=1IILzCTkADDfiUlK+hVtojxgI5C2VrWPmCcGOW7x0XM=; b=5StZ5xQ17fY7wWMH380TtWTvsRiMYujkjhlTzDjfEjQ1qF8yMHvpbQowUSBBNBOHqnIu 2w+JS4IUiQ1S6uajXHMgkaKQlBHLYKHpY+7at+v9QeUltJQy6keFQ6rtXxOCm2c+4Oslf 7NP5VeJ/fg1sXPPjkgZ6gdub8wvAZ4fUHfcjtSs6oyPObu/Jp46XGAle318sFc2f23jNl PJhzM7IHP+jUJAbsvB3NgVqwWV1apC27K+stI1+MyPlCepu9urwU9Ps+n+DRbQnzT3sC/ jxf6QXCSxhlsoo+duswYT3jwNHgrCCJG7p/frO5J8tLOEO5+3wMbueaV5xTv5LFb4nw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=Dk1HIBPb; arc=none smtp.remote-ip=209.85.215.179 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D809606A325 for ; Mon, 30 Nov 2026 19:11:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2D809606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=Dk1HIBPb Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-ccca948203aso7339156a12.3 for ; Mon, 30 Nov 2026 11:11:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1796065874; x=1796670674; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=1IILzCTkADDfiUlK+hVtojxgI5C2VrWPmCcGOW7x0XM=; b=Dk1HIBPbDXaosK6uxyyn3Kj1CV88qiyxhxySEADoxPb7ycLaukCiq+/H3R4Z+kqWNW 7LWXM0t8yhZH0QSS3rfy8Uv/7Oi0DeZ+lG1kF2QH1q6y/3SWY2cxl5MSGm/YMN3C3Q4z /klxWYzNXBQKZp0QiF1thMOlPHSJ+apCYuYodrMx76vSTSbekUbYbync8KM0wx/UGDrw qcbMJOKWvqNa8GWUu+34oSdLEMYpeUrZzCFMM6AiIN7u4O9bidncKNarbHNCwkL6moAq uiaEqHGxea4oMbpAIofmLeQerPzWoLQoOCRExPxtCPJjf06Rqs98cdqdk56yPdBn9jQE hZOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796065874; x=1796670674; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=1IILzCTkADDfiUlK+hVtojxgI5C2VrWPmCcGOW7x0XM=; b=RZwfvvRg18C3crXKd2xBRWW4BVpKzfx+H+sBW7RS4kvjpmQeQRq4qArUdh2YZNN4BH LkgHN+LZ54zo14oPZ9xcPGDrqTGPkqlrav9aDBBbyWDzsg69jssiLHP5IDy98J+zpdyq nlkrJ8hXHy1dYOvaz2rXFNg/9vbccfLedK4oFCgvEZdMVbn7fBvzJCD2FUpUQ0z/Q5sn ddygCaoQ5KkutTtKTNqeE/DKP2EWyfMzxwiPveO+0K0rB1m1t6L4l8+tujKfCa2dbMt0 UO2WBCSYdNQBzaUOx920o7AVZKJJ+GGBb1Ku5L5eHb6OFMUHg4+GtLmbXAGJrtIPKlPv MmLQ== X-Gm-Message-State: APuU4Z9QfyR2QmrqFHN1UMGjmXv/WWAekY+UcnB6qv9n1nm1QAH1hmlH SII+GCUR9AV4YfM+Oo+x8FNdmsHbB5eYGN0QmT2iusU/p0wncY4+mcFSp5xZW6Anw26jCim3E4E kk77zDGY= X-Gm-Gg: AZFdTZfuh9qU7WJWaHW0flfDtyPkyg6Aw2xRHdjUvhYy9xi+p1cYQatBqkJL+vNMV07 nNdj1/mdKWw8mWa3jG8EAXqNGWy0XleEJe3A4Th6oIAAndiu8qmLvOde3KnA/xzhce1SVzb7KMk sRbJFs9pOFgf3QQLe1UJn24jYOXzj1APvv9dIiFuHuaO1B7iAgueLLDz2BmwM/zizYUTpMtK6QD I5uKV7iff3k/nlI6hp49XumAjnaStERNkfQlwkzPrsa7qo6OhgKJVs7X5viGmKQXL1HumG8Unb7 kbsyXzRct3m/9LxLkE8kqNb3Vhz9L4KQAD8k9Yyy2jS3tSEmDL6yyXWmqFFZEBWNNJ7ULN1ayTo cBliPXJrE/a5gD1xUaCjas/xHXl0nOEYV3aePiS/Ad7xbnCpTfCHlSuU0Lue0twh4jdLPvDO8c0 z8l8YpuYRrJTWqhFcCC0rGAnGnXr2Qvbmptc0n2Zu/sJiMI/4w2IE3KuQ/mSP5+4lLtJ7KXJJn6 BzcxyxdBy/Nyfrh1WRfPKH4PjB32SKfXo1KOB1SACGZXlVWLlL5hzAU2ivlebVAsI1zpG+cRcMM a0huwhptWLP8gctxPUkzrekKZSuVGLt/5CpZf6ViYo2aGHLQs3kA8E5CGEV8kt1PvF/o X-Received: by 2002:a17:90b:3f0f:b0:3b4:393:452a with SMTP id 98e67ed59e1d1-3b41c9120c3mr37190012a91.23.1796065874550; Mon, 30 Nov 2026 11:11:14 -0800 (PST) Received: from phoenix.lan (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b40f4312dfsm55591195a91.3.2026.11.30.11.11.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 11:11:14 -0800 (PST) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: dsahern@kernel.org, Stephen Hemminger Subject: [PATCH iproute2-next 01/10] xfrm: rename shadowed SA direction local Date: Mon, 30 Nov 2026 10:47:02 -0800 Message-ID: <20261130184752.545119-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261130184752.545119-1-stephen@networkplumber.org> References: <20261130184752.545119-1-stephen@networkplumber.org> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit xfrm_xfrma_print() takes a bool parameter named "dir" that selects whether the direction is printed. The XFRMA_SA_DIR block declares a __u8 local of the same name holding the attribute value, so the two distinct meanings share one identifier and the local hides the parameter for the rest of the block. Rename the local to sa_dir. No change in output; the fallback that prints an unrecognized direction keeps reporting the attribute value rather than the print flag. Signed-off-by: Stephen Hemminger --- ip/ipxfrm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c index 78d9e192..4a63dc16 100644 --- a/ip/ipxfrm.c +++ b/ip/ipxfrm.c @@ -908,15 +908,15 @@ void xfrm_xfrma_print(struct rtattr *tb[], __u16 family, FILE *fp, fprintf(fp, "%s", _SL_); } if (tb[XFRMA_SA_DIR]) { - __u8 dir = rta_getattr_u8(tb[XFRMA_SA_DIR]); + __u8 sa_dir = rta_getattr_u8(tb[XFRMA_SA_DIR]); fprintf(fp, "\tdir "); - if (dir == XFRM_SA_DIR_IN) + if (sa_dir == XFRM_SA_DIR_IN) fprintf(fp, "in"); - else if (dir == XFRM_SA_DIR_OUT) + else if (sa_dir == XFRM_SA_DIR_OUT) fprintf(fp, "out"); else - fprintf(fp, "other (%d)", dir); + fprintf(fp, "other (%d)", sa_dir); fprintf(fp, "%s", _SL_); } if (tb[XFRMA_SA_PCPU]) { -- 2.53.0