From: "flichtenheld (Code Review)"
Date: Tue, 5 Aug 2025 16:00:20 +0000
In-Reply-To:
References:
Reply-To: frank@...2641..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net
Message-ID: <5862870e648c6f52f1a65e0381605d1148753507-EmailReplacePatchSet-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="GC0HfcwqX6g="; charset=UTF-8
Subject: [Openvpn-devel] [S] Change in openvpn[master]: route: Make sure
various route flags are treated as unsigned
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: plaisthos
Cc: openvpn-devel
--GC0HfcwqX6g=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/1109?usp=3Demail
to look at the new patch set (#4).
Change subject: route: Make sure various route flags are treated as unsigned
......................................................................
route: Make sure various route flags are treated as unsigned
The variables that hold them are already unsigned, make sure
the flags are as well to avoid spurious conversion warnings.
Change-Id: Ib7f78abbcd52c00a32afdea36ef635681ac8e127
Signed-off-by: Frank Lichtenheld
---
M src/openvpn/route.h
1 file changed, 14 insertions(+), 14 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/09/1109/4
diff --git a/src/openvpn/route.h b/src/openvpn/route.h
index ea8b767..9b6a47e 100644
--- a/src/openvpn/route.h
+++ b/src/openvpn/route.h
@@ -83,14 +83,14 @@
};
/* redirect-gateway flags */
-#define RG_ENABLE (1 << 0)
-#define RG_LOCAL (1 << 1)
-#define RG_DEF1 (1 << 2)
-#define RG_BYPASS_DHCP (1 << 3)
-#define RG_BYPASS_DNS (1 << 4)
-#define RG_REROUTE_GW (1 << 5)
-#define RG_AUTO_LOCAL (1 << 6)
-#define RG_BLOCK_LOCAL (1 << 7)
+#define RG_ENABLE (1u << 0)
+#define RG_LOCAL (1u << 1)
+#define RG_DEF1 (1u << 2)
+#define RG_BYPASS_DHCP (1u << 3)
+#define RG_BYPASS_DNS (1u << 4)
+#define RG_REROUTE_GW (1u << 5)
+#define RG_AUTO_LOCAL (1u << 6)
+#define RG_BLOCK_LOCAL (1u << 7)
struct route_option_list
{
@@ -117,9 +117,9 @@
struct route_ipv4
{
-#define RT_DEFINED (1 << 0)
-#define RT_ADDED (1 << 1)
-#define RT_METRIC_DEFINED (1 << 2)
+#define RT_DEFINED (1u << 0)
+#define RT_ADDED (1u << 1)
+#define RT_METRIC_DEFINED (1u << 2)
struct route_ipv4 *next;
unsigned int flags;
const struct route_option *option;
@@ -227,9 +227,9 @@
struct route_list
{
-#define RL_DID_REDIRECT_DEFAULT_GATEWAY (1 << 0)
-#define RL_DID_LOCAL (1 << 1)
-#define RL_ROUTES_ADDED (1 << 2)
+#define RL_DID_REDIRECT_DEFAULT_GATEWAY (1u << 0)
+#define RL_DID_LOCAL (1u << 1)
+#define RL_ROUTES_ADDED (1u << 2)
unsigned int iflags;
struct route_special_addr spec;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1109?usp=3Demail
To unsubscribe, or for help writing mail filters, visit http://gerrit.openv=
pn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib7f78abbcd52c00a32afdea36ef635681ac8e127
Gerrit-Change-Number: 1109
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-Attention: plaisthos
Gerrit-MessageType: newpatchset
--GC0HfcwqX6g=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: plaisthos.
flichtenheld uploaded patch set #4 to this change.
<=
p>View C=
hange
route: Make sure various route flags are treated as unsigned
<=
br>The variables that hold them are already unsigned, make sure
the flag=
s are as well to avoid spurious conversion warnings.
Change-Id: Ib7f=
78abbcd52c00a32afdea36ef635681ac8e127
Signed-off-by: Frank Lichtenheld &=
lt;frank@...2641...>
---
M src/openvpn/route.h
1 file changed, =
14 insertions(+), 14 deletions(-)
git pull ssh://gerrit.openvpn.n=
et:29418/openvpn refs/changes/09/1109/4
diff --git a/src/openvpn/ro=
ute.h b/src/openvpn/route.h
index ea8b767..9b6a47e 100644=
span>
--- a/src/openvpn/route.h
+++ b/src/openvpn/=
route.h
@@ -83,14 +83,14 @@
};
<=
span>
/* redirect-gateway flags */
-#define RG_ENABLE (1 << 0)
-#define RG_LOCAL (1 &=
lt;< 1)
-#define RG_=
DEF1 (1 << 2)
-#define RG_BYPASS_DHCP (1 << 3)
-#define RG_BYPASS_DNS (1 << 4)
-#define RG_REROUTE_GW (1 << 5)<=
/span>
-#define RG_AUTO_LOCAL =
(1 << 6)
-#defin=
e RG_BLOCK_LOCAL (1 << 7)
+#define RG_ENABLE (1u << 0)
+#define RG_LOCAL (1u << 1)
+#define RG_DEF1 (1=
u << 2)
+#defin=
e RG_BYPASS_DHCP (1u << 3)
+#define RG_BYPASS_DNS (1u << 4)
+#define RG_REROUTE_GW (1u << 5)
+#define RG_AUTO_LOCAL =
(1u << 6)
+#de=
fine RG_BLOCK_LOCAL (1u << 7)
stru=
ct route_option_list
{
@@ -117,9 +117,9 @@=
struct route_ipv4
{
-#define RT_DEFINED =
(1 << 0)
-#defi=
ne RT_ADDED (1 << 1)
-#define RT_METRIC_DEFINED (1 << 2)
+#define RT_DEFINED (1u << 0=
)
+#define RT_ADDED =
(1u << 1)
+#define RT_METRIC_DEFINED (1u << 2)
struct r=
oute_ipv4 *next;
unsigned int flags;
=
const struct route_option *option;
@@ -227,9 +227,9 @@<=
/span>
struct route_list
{
-#define RL_DID_REDIRECT_D=
EFAULT_GATEWAY (1 << 0)
-#define RL_DID_LOCAL (1 << 1)
-#define RL_ROUTES_ADDED =
(1 << 2)
=
+#define RL_DID_REDIRECT_DEFAULT_GATEWAY (1u << 0)
+#define RL_DID_LOCAL =
(1u << 1)
+#d=
efine RL_ROUTES_ADDED (1u << 2)
=
unsigned int iflags;
struct route_sp=
ecial_addr spec;
To view, visit change 1109=
. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib7f78abbcd52c00a32afdea36ef=
635681ac8e127
Gerrit-Change-Number: 1109
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld <frank@...2723...=
.>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...=
..1227...>
Gerrit-MessageType: newpatchset
--GC0HfcwqX6g=--