[Openvpn-devel] [S] Change in openvpn[master]: Make pull_permission_mask return uint64_t
"plaisthos \(Code Review\) via Openvpn-devel" <[email protected]>
| Newsgroups | net.sourceforge.lists.openvpn-devel |
|---|---|
| Message-ID | <[email protected]> |
plaisthos has uploaded this change for review. ( http://gerrit.openvpn.net/c/openvpn/+/1851?usp=email ) Change subject: Make pull_permission_mask return uint64_t ...................................................................... Make pull_permission_mask return uint64_t Commit 91fd9614 already change most of the instances for the option flag to uint64_t but forgot to also adjust pull_permission_mask. Change-Id: Icd53745b242e0ca2943863d5b274b2a13b4419bd Signed-off-by: Arne Schwabe <[email protected]> --- M src/openvpn/init.c M src/openvpn/init.h M src/openvpn/options.h M src/openvpn/push_util.c M tests/unit_tests/openvpn/test_push_update_msg.c 5 files changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/51/1851/1 diff --git a/src/openvpn/init.c b/src/openvpn/init.c index fa62cdd..66bae34 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -2514,13 +2514,13 @@ /* * These are the option categories which will be accepted by pull. */ -unsigned int +uint64_t pull_permission_mask(const struct context *c) { - unsigned int flags = OPT_P_UP | OPT_P_ROUTE_EXTRAS | OPT_P_SOCKBUF | OPT_P_SOCKFLAGS - | OPT_P_SETENV | OPT_P_SHAPER | OPT_P_TIMER | OPT_P_COMP | OPT_P_PERSIST - | OPT_P_MESSAGES | OPT_P_EXPLICIT_NOTIFY | OPT_P_ECHO | OPT_P_PULL_MODE - | OPT_P_PEER_ID | OPT_P_NCP | OPT_P_PUSH_MTU; + uint64_t flags = OPT_P_UP | OPT_P_ROUTE_EXTRAS | OPT_P_SOCKBUF | OPT_P_SOCKFLAGS + | OPT_P_SETENV | OPT_P_SHAPER | OPT_P_TIMER | OPT_P_COMP | OPT_P_PERSIST + | OPT_P_MESSAGES | OPT_P_EXPLICIT_NOTIFY | OPT_P_ECHO | OPT_P_PULL_MODE + | OPT_P_PEER_ID | OPT_P_NCP | OPT_P_PUSH_MTU; if (!c->options.route_nopull) { diff --git a/src/openvpn/init.h b/src/openvpn/init.h index 9d5050d..ce8f74e 100644 --- a/src/openvpn/init.h +++ b/src/openvpn/init.h @@ -89,7 +89,7 @@ */ bool do_update(struct context *c, uint64_t option_types_found); -unsigned int pull_permission_mask(const struct context *c); +uint64_t pull_permission_mask(const struct context *c); const char *format_common_name(struct context *c, struct gc_arena *gc); diff --git a/src/openvpn/options.h b/src/openvpn/options.h index 0fd505a..9fa44f0 100644 --- a/src/openvpn/options.h +++ b/src/openvpn/options.h @@ -761,7 +761,7 @@ #define OPT_P_PUSH_MTU (1u << 30) #define OPT_P_ROUTE_TABLE (1u << 31) -#define OPT_P_DEFAULT (~(OPT_P_INSTANCE | OPT_P_PULL_MODE)) +#define OPT_P_DEFAULT (~(OPT_P_INSTANCE | OPT_P_PULL_MODE | 0x0ull)) #define PULL_DEFINED(opt) ((opt)->pull) diff --git a/src/openvpn/push_util.c b/src/openvpn/push_util.c index c927f26..fcc5411 100644 --- a/src/openvpn/push_util.c +++ b/src/openvpn/push_util.c @@ -185,7 +185,7 @@ */ struct buffer tmp_msg = e->buf; buf_string_compare_advance(&tmp_msg, push_update_cmd); - unsigned int permission_mask = pull_permission_mask(c); + uint64_t permission_mask = pull_permission_mask(c); if (process_push_update(c, &o, permission_mask, &option_types_found, &tmp_msg, true) == PUSH_MSG_ERROR) { msg(M_WARN, "Failed to process push update message sent to client ID: %u", c->c2.tls_multi->rx_peer_id); diff --git a/tests/unit_tests/openvpn/test_push_update_msg.c b/tests/unit_tests/openvpn/test_push_update_msg.c index 9cb791b..01bf6c8 100644 --- a/tests/unit_tests/openvpn/test_push_update_msg.c +++ b/tests/unit_tests/openvpn/test_push_update_msg.c @@ -20,7 +20,7 @@ msg(M_WARN, "Offending option received from server"); } -unsigned int +uint64_t pull_permission_mask(const struct context *c) { unsigned int flags = OPT_P_UP | OPT_P_ROUTE_EXTRAS | OPT_P_SOCKBUF | OPT_P_SOCKFLAGS -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1851?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Icd53745b242e0ca2943863d5b274b2a13b4419bd Gerrit-Change-Number: 1851 Gerrit-PatchSet: 1 Gerrit-Owner: plaisthos <[email protected]> Gerrit-CC: openvpn-devel <[email protected]> _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel