Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2774833ybd; Thu, 27 Jun 2019 19:38:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRSgX/QI3XE01Mk6v/dmSPvoaJQLJU//lR0TQhn6Aj0z4l0ZdCCCqDQsTEi9lUs0vvP4gs X-Received: by 2002:a17:90a:380d:: with SMTP id w13mr9928490pjb.138.1561689494219; Thu, 27 Jun 2019 19:38:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561689494; cv=none; d=google.com; s=arc-20160816; b=pc+zI1QTZVT3Acz4qjGgvgDwN0zQaamhefU4TaaAoi7c+ECB7dikDQKsg6fPlaqAfK wR89mzQfepI9J7g48KN42fA45PMNEFdKRu02JnOQwbEeH4i5ge5M2a1/pee4OWSoKWik LZClYG2773ryUgpI0YiaH+Lg6+G9AhR7kVmBs6GihN7ub/ALxkqD1GSJKB3H0fub/Une fP9CWMdR68iaNOdvZ7IOuQuLP+NbPBfSlqJgJR7qn2wp4G8RYJ+Kk6pzkSjA19/e7MrJ F4WCDA3Ft2RHzHlS3r/vSF68Gq9rpIqXtyATbT8uefVJk15XTfaPQK0UuHl7cMpgPwWq HNhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=roaztKtTkRu8pn3yWaNhfvLdHNSmDj0YJDhL6E5EN+0=; b=pB9qwk+7u6YChKpN8VK1JpAW9Law1AQ2Mspbrt8ra8BdOy+4V8C1n8NE0BN1rNjjJp JbllycHVSMNfkFBQOtVWcnIqTB3kxZ+O8+dMDB7XKImAxA2u2JNmpf62QPyx+Vl9jHrs Yj0saSwA4+0V4d+6QqBhn+bkqi/vn3fK/M0XmkoYzH06rCbsKDBpSu1PpK3pvbQ4INjw 0SQUUitG1ZmKs9y4d7iaEpq5mvOPBLqH4tAAd4WRZ2KZI8GQ3A6R6Ya3HTyaHpc8pihp pmHfl1PxTXmtWGBeQ52c4gAve+3trLdNZVJ7AwcuJ4oDoughdi3jtmsF81JJqBMBk4qf iVjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@etsukata-com.20150623.gappssmtp.com header.s=20150623 header.b=rukbDA3C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l97si902549pje.6.2019.06.27.19.37.58; Thu, 27 Jun 2019 19:38:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@etsukata-com.20150623.gappssmtp.com header.s=20150623 header.b=rukbDA3C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726686AbfF1Chq (ORCPT + 99 others); Thu, 27 Jun 2019 22:37:46 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:35766 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726482AbfF1Chp (ORCPT ); Thu, 27 Jun 2019 22:37:45 -0400 Received: by mail-pl1-f196.google.com with SMTP id w24so2349053plp.2 for ; Thu, 27 Jun 2019 19:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=etsukata-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=roaztKtTkRu8pn3yWaNhfvLdHNSmDj0YJDhL6E5EN+0=; b=rukbDA3CpnhMC7Q3iFXSeQ2HtDS7nCRUjmzI73bUUVB22U1aRiyRjlQ9Zh9EDbi/V6 U4nUJWUK3Xh6Y54+Rkfas3b5KPNZvIxPiAhdgV2OIj+WJMHyXoPqJSU83OaUclWn90Zi PZjEXxHlwrWFKhfq0Qk49+IaZcw6ssGei44MrIbwlLKRPkOwkzkv0jM9rEnCw+vOeIMs EITDkhfRKI28nKKknobZm+0zSIMv9Y0taN+4zXHhKeq4bxbPJ5A1d+mGh3ZDq75As6oV 1TeJtBZJKbzU+16ItZURdexunhMxEY1sMlyuc5o8w5rmUK/A6mh1iNBSsYsz0dh8QW0J TRkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=roaztKtTkRu8pn3yWaNhfvLdHNSmDj0YJDhL6E5EN+0=; b=D2Bbo5tOpgi5pvSqkU8Z7EMi/+7k+IOXjLOmdIKTxrhYE1mquCyGY9qGIVONTaDm3W brx+uIXlUD0yp4CXQIhkz+OefPU3wx93izm+29t2y/LKUCmiO6x4klSByiCfn6r6BZ4n YBhHumRN/yJ3W83S46jPWmiT9rdaZKbc0r/SRPnGLvVP2a4WQbepIJC9HSuxyXjpjyVq rEMPOmlkg7qMaux5DTx9gLHAJq31imR6nBcfuuZWHmMX04yghuRXxNl+UfRweJfseziv BbYkUkkN8TlUhYXNKJa5a7FrUtnW6hwG7cXsKORceBa2jx7RIZFZ2Wm685lWr65/h93M TwcQ== X-Gm-Message-State: APjAAAXyX69XGdQwZcGmty+j5pbWtJi55HV8pWu0cquOddVFdY3dKu7M SZTCadJV7IrOY///kYq/wailghFiMDY= X-Received: by 2002:a17:902:8f93:: with SMTP id z19mr8245017plo.97.1561689465143; Thu, 27 Jun 2019 19:37:45 -0700 (PDT) Received: from localhost.localdomain (p2517222-ipngn21701marunouchi.tokyo.ocn.ne.jp. [118.7.246.222]) by smtp.gmail.com with ESMTPSA id i3sm368206pgq.40.2019.06.27.19.37.42 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 27 Jun 2019 19:37:44 -0700 (PDT) From: Eiichi Tsukata To: davem@davemloft.net, edumazet@google.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Eiichi Tsukata Subject: [PATCH net-next] net/ipv6: Fix misuse of proc_dointvec "flowlabel_reflect" Date: Fri, 28 Jun 2019 11:37:14 +0900 Message-Id: <20190628023714.1923-1-devel@etsukata.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org /proc/sys/net/ipv6/flowlabel_reflect assumes written value to be in the range of 0 to 3. Use proc_dointvec_minmax instead of proc_dointvec. Fixes: 323a53c41292 ("ipv6: tcp: enable flowlabel reflection in some RST packets") Signed-off-by: Eiichi Tsukata --- net/ipv6/sysctl_net_ipv6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 6d86fac472e7..831573461e19 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c @@ -114,7 +114,7 @@ static struct ctl_table ipv6_table_template[] = { .data = &init_net.ipv6.sysctl.flowlabel_reflect, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec, + .proc_handler = proc_dointvec_minmax, .extra1 = &zero, .extra2 = &three, }, -- 2.21.0