From: stipa (C. Review) <ge...@op...> - 2025-07-31 10:56:29
|
Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email to review the following change. Change subject: Fix DNS options duplication on PUSH_UPDATE ...................................................................... Fix DNS options duplication on PUSH_UPDATE Commit 2dfc4f ("dns: deal with --dhcp-options when --dns is active") has removed reset of tuntap DNS options. Due to that, incoming --dns options are added to existing ones instead of overwriting them. It has also added a new storage for --dhcp-option. The push-update code didn't clear it and as a result, incoming --dhcp-option options were added to existing once instead of overwriting them. Fixed by: - reseting tuntap DNS options (regression from abovementioned commit) - clearing dhcp options storage in push-update code Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Signed-off-by: Lev Stipakov <le...@op...> --- M src/openvpn/options.c 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/21/1121/1 diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 3753810..8ce57ff 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3527,7 +3527,13 @@ #endif /* if defined(_WIN32) */ /* Copy --dns options to tuntap_options */ + const struct dns_domain *d = dns->search_domains; + if (d) + { + tt->domain_search_list_len = 0; + } + while (d && tt->domain_search_list_len + 1 < N_SEARCH_LIST_LEN) { tt->domain_search_list[tt->domain_search_list_len++] = d->name; @@ -3539,6 +3545,12 @@ } const struct dns_server *s = dns->servers; + if (s) + { + tt->dns_len = 0; + tt->dns6_len = 0; + } + while (s) { bool non_standard_server_port = false; @@ -6212,6 +6224,8 @@ } o->disable_nbt = 0; o->dhcp_options = 0; + + CLEAR(options->dns_options.from_dhcp); #if defined(TARGET_ANDROID) o->http_proxy_port = 0; o->http_proxy = NULL; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Gerrit-Change-Number: 1121 Gerrit-PatchSet: 1 Gerrit-Owner: stipa <lst...@gm...> Gerrit-Reviewer: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-MessageType: newchange |
From: stipa (C. Review) <ge...@op...> - 2025-07-31 11:21:50
|
Attention is currently required from: flichtenheld, plaisthos. Hello flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email to look at the new patch set (#2). Change subject: Fix DNS options duplication on PUSH_UPDATE ...................................................................... Fix DNS options duplication on PUSH_UPDATE Commit 2dfc4f ("dns: deal with --dhcp-options when --dns is active") has removed reset of tuntap DNS options. Due to that, incoming --dns options are added to existing ones instead of overwriting them. It has also added a new storage for --dhcp-option. The push-update code didn't clear it and as a result, incoming --dhcp-option options were added to existing once instead of overwriting them. Fixed by: - reseting tuntap DNS options (regression from abovementioned commit) - clearing dhcp options storage in push-update code GitHub: fixes OpenVPN/openvpn#804 Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Signed-off-by: Lev Stipakov <le...@op...> --- M src/openvpn/options.c 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/21/1121/2 diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 3753810..8ce57ff 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3527,7 +3527,13 @@ #endif /* if defined(_WIN32) */ /* Copy --dns options to tuntap_options */ + const struct dns_domain *d = dns->search_domains; + if (d) + { + tt->domain_search_list_len = 0; + } + while (d && tt->domain_search_list_len + 1 < N_SEARCH_LIST_LEN) { tt->domain_search_list[tt->domain_search_list_len++] = d->name; @@ -3539,6 +3545,12 @@ } const struct dns_server *s = dns->servers; + if (s) + { + tt->dns_len = 0; + tt->dns6_len = 0; + } + while (s) { bool non_standard_server_port = false; @@ -6212,6 +6224,8 @@ } o->disable_nbt = 0; o->dhcp_options = 0; + + CLEAR(options->dns_options.from_dhcp); #if defined(TARGET_ANDROID) o->http_proxy_port = 0; o->http_proxy = NULL; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Gerrit-Change-Number: 1121 Gerrit-PatchSet: 2 Gerrit-Owner: stipa <lst...@gm...> Gerrit-Reviewer: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-MessageType: newpatchset |
From: d12fk (C. Review) <ge...@op...> - 2025-07-31 12:07:53
|
Attention is currently required from: flichtenheld, plaisthos, stipa. d12fk has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email ) Change subject: Fix DNS options duplication on PUSH_UPDATE ...................................................................... Patch Set 2: (4 comments) Commit Message: http://gerrit.openvpn.net/c/openvpn/+/1121/comment/cc9f9b67_aace83f8 : PS2, Line 18: were added to existing once instead of overwriting them. *existing ones http://gerrit.openvpn.net/c/openvpn/+/1121/comment/6f40d257_3c5dd855 : PS2, Line 22: - reseting tuntap DNS options (regression from abovementioned commit) *resetting File src/openvpn/options.c: http://gerrit.openvpn.net/c/openvpn/+/1121/comment/769a02c7_b70d0065 : PS2, Line 3548: if (s) s will never be NULL here, in that case we'd branched to /* Copy --dhcp-options to tuntap_options */ above already http://gerrit.openvpn.net/c/openvpn/+/1121/comment/c0668a3d_ef605be7 : PS2, Line 6227: This code should instead store the DNS related things in `options->dns_options.from_dhcp`. Using `tuntap_options` directly is not how it is done any longer. Instead "values" of whatever origin are copied to `tuntap_options` during the postprocess stage if needed. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Gerrit-Change-Number: 1121 Gerrit-PatchSet: 2 Gerrit-Owner: stipa <lst...@gm...> Gerrit-Reviewer: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: d12fk <he...@op...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Attention: stipa <lst...@gm...> Gerrit-Comment-Date: Thu, 31 Jul 2025 12:07:39 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment |
From: stipa (C. Review) <ge...@op...> - 2025-07-31 12:19:30
|
Attention is currently required from: flichtenheld, plaisthos, stipa. Hello flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email to look at the new patch set (#3). Change subject: Fix DNS options duplication on PUSH_UPDATE ...................................................................... Fix DNS options duplication on PUSH_UPDATE Commit 2dfc4f ("dns: deal with --dhcp-options when --dns is active") has removed reset of tuntap DNS options. Due to that, incoming --dns options are added to existing ones instead of overwriting them. It has also added a new storage for --dhcp-option. The push-update code didn't clear it and as a result, incoming --dhcp-option options were added to existing ones instead of overwriting them. Fixed by: - resetting tuntap DNS options (regression from abovementioned commit) - clearing dhcp options storage in push-update code GitHub: fixes OpenVPN/openvpn#804 Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Signed-off-by: Lev Stipakov <le...@op...> --- M src/openvpn/options.c 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/21/1121/3 diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 3753810..3ceada0 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3527,7 +3527,13 @@ #endif /* if defined(_WIN32) */ /* Copy --dns options to tuntap_options */ + const struct dns_domain *d = dns->search_domains; + if (d) + { + tt->domain_search_list_len = 0; + } + while (d && tt->domain_search_list_len + 1 < N_SEARCH_LIST_LEN) { tt->domain_search_list[tt->domain_search_list_len++] = d->name; @@ -3538,6 +3544,9 @@ msg(M_WARN, "WARNING: couldn't copy all --dns search-domains to TUN/TAP"); } + tt->dns_len = 0; + tt->dns6_len = 0; + const struct dns_server *s = dns->servers; while (s) { @@ -6212,6 +6221,8 @@ } o->disable_nbt = 0; o->dhcp_options = 0; + + CLEAR(options->dns_options.from_dhcp); #if defined(TARGET_ANDROID) o->http_proxy_port = 0; o->http_proxy = NULL; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Gerrit-Change-Number: 1121 Gerrit-PatchSet: 3 Gerrit-Owner: stipa <lst...@gm...> Gerrit-Reviewer: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: d12fk <he...@op...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Attention: stipa <lst...@gm...> Gerrit-MessageType: newpatchset |
From: stipa (C. Review) <ge...@op...> - 2025-07-31 12:19:42
|
Attention is currently required from: d12fk, flichtenheld, plaisthos. stipa has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email ) Change subject: Fix DNS options duplication on PUSH_UPDATE ...................................................................... Patch Set 2: (4 comments) Commit Message: http://gerrit.openvpn.net/c/openvpn/+/1121/comment/0cd9cff6_537c22be : PS2, Line 18: were added to existing once instead of overwriting them. > *existing ones Acknowledged http://gerrit.openvpn.net/c/openvpn/+/1121/comment/4febbb73_89ff723d : PS2, Line 22: - reseting tuntap DNS options (regression from abovementioned commit) > *resetting Acknowledged File src/openvpn/options.c: http://gerrit.openvpn.net/c/openvpn/+/1121/comment/d5dc85c6_45b16c8c : PS2, Line 3548: if (s) > s will never be NULL here, in that case we'd branched to /* Copy --dhcp-options to tuntap_options */ […] Acknowledged http://gerrit.openvpn.net/c/openvpn/+/1121/comment/472f0a8d_8ef94cd9 : PS2, Line 6227: > This code should instead store the DNS related things in `options->dns_options.from_dhcp`. […] but we don't store anything here - just nullifying tuntap_options and calling add_option(), which does the right thing by storing data in from_dhcp. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Gerrit-Change-Number: 1121 Gerrit-PatchSet: 2 Gerrit-Owner: stipa <lst...@gm...> Gerrit-Reviewer: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: d12fk <he...@op...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Attention: d12fk <he...@op...> Gerrit-Comment-Date: Thu, 31 Jul 2025 12:19:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: d12fk <he...@op...> Gerrit-MessageType: comment |
From: d12fk (C. Review) <ge...@op...> - 2025-07-31 12:22:41
|
Attention is currently required from: flichtenheld, plaisthos, stipa. d12fk has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email ) Change subject: Fix DNS options duplication on PUSH_UPDATE ...................................................................... Patch Set 3: (1 comment) File src/openvpn/options.c: http://gerrit.openvpn.net/c/openvpn/+/1121/comment/d515ce38_997af3de : PS2, Line 6227: > but we don't store anything here - just nullifying tuntap_options and calling add_option(), which do […] Ah yes, misjudged where this code is actually located, thought it was the regular option processing. All good here. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Gerrit-Change-Number: 1121 Gerrit-PatchSet: 3 Gerrit-Owner: stipa <lst...@gm...> Gerrit-Reviewer: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: d12fk <he...@op...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Attention: stipa <lst...@gm...> Gerrit-Comment-Date: Thu, 31 Jul 2025 12:22:32 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: d12fk <he...@op...> Comment-In-Reply-To: stipa <lst...@gm...> Gerrit-MessageType: comment |
From: d12fk (C. Review) <ge...@op...> - 2025-07-31 12:23:09
|
Attention is currently required from: flichtenheld, plaisthos, stipa. d12fk has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email ) Change subject: Fix DNS options duplication on PUSH_UPDATE ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Gerrit-Change-Number: 1121 Gerrit-PatchSet: 3 Gerrit-Owner: stipa <lst...@gm...> Gerrit-Reviewer: d12fk <he...@op...> Gerrit-Reviewer: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: flichtenheld <fr...@li...> Gerrit-Attention: stipa <lst...@gm...> Gerrit-Comment-Date: Thu, 31 Jul 2025 12:23:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment |
From: Gert D. <ge...@gr...> - 2025-07-31 12:24:23
|
From: Lev Stipakov <le...@op...> Commit 2dfc4f ("dns: deal with --dhcp-options when --dns is active") has removed reset of tuntap DNS options. Due to that, incoming --dns options are added to existing ones instead of overwriting them. It has also added a new storage for --dhcp-option. The push-update code didn't clear it and as a result, incoming --dhcp-option options were added to existing ones instead of overwriting them. Fixed by: - resetting tuntap DNS options (regression from abovementioned commit) - clearing dhcp options storage in push-update code GitHub: fixes OpenVPN/openvpn#804 Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Signed-off-by: Lev Stipakov <le...@op...> Acked-by: Heiko Hund <he...@op...> --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1121 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Heiko Hund <he...@op...> diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 3753810..3ceada0 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3527,7 +3527,13 @@ #endif /* if defined(_WIN32) */ /* Copy --dns options to tuntap_options */ + const struct dns_domain *d = dns->search_domains; + if (d) + { + tt->domain_search_list_len = 0; + } + while (d && tt->domain_search_list_len + 1 < N_SEARCH_LIST_LEN) { tt->domain_search_list[tt->domain_search_list_len++] = d->name; @@ -3538,6 +3544,9 @@ msg(M_WARN, "WARNING: couldn't copy all --dns search-domains to TUN/TAP"); } + tt->dns_len = 0; + tt->dns6_len = 0; + const struct dns_server *s = dns->servers; while (s) { @@ -6212,6 +6221,8 @@ } o->disable_nbt = 0; o->dhcp_options = 0; + + CLEAR(options->dns_options.from_dhcp); #if defined(TARGET_ANDROID) o->http_proxy_port = 0; o->http_proxy = NULL; |
From: Gert D. <ge...@gr...> - 2025-07-31 12:56:33
|
This looks generally reasonable, and if Heiko (who understands the "DNS related data flow" around options.c way better than I do) says this is fine, it should be :-) - so, in it goes, just in time for Alpha3... Test compiled on Windows/MinGW (as the buildbots are busy and I am impatient). Your patch has been applied to the master branch. commit 70d4c6776bd563f487add399bd4acf58c5e22334 Author: Lev Stipakov Date: Thu Jul 31 14:24:05 2025 +0200 Fix DNS options duplication on PUSH_UPDATE Signed-off-by: Lev Stipakov <le...@op...> Acked-by: Heiko Hund <he...@op...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32448.html Signed-off-by: Gert Doering <ge...@gr...> -- kind regards, Gert Doering |
From: cron2 (C. Review) <ge...@op...> - 2025-07-31 12:56:59
|
cron2 has uploaded a new patch set (#4) to the change originally created by stipa. ( http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email ) The following approvals got outdated and were removed: Code-Review+2 by d12fk Change subject: Fix DNS options duplication on PUSH_UPDATE ...................................................................... Fix DNS options duplication on PUSH_UPDATE Commit 2dfc4f ("dns: deal with --dhcp-options when --dns is active") has removed reset of tuntap DNS options. Due to that, incoming --dns options are added to existing ones instead of overwriting them. It has also added a new storage for --dhcp-option. The push-update code didn't clear it and as a result, incoming --dhcp-option options were added to existing ones instead of overwriting them. Fixed by: - resetting tuntap DNS options (regression from abovementioned commit) - clearing dhcp options storage in push-update code GitHub: fixes OpenVPN/openvpn#804 Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Signed-off-by: Lev Stipakov <le...@op...> Acked-by: Heiko Hund <he...@op...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32448.html Signed-off-by: Gert Doering <ge...@gr...> --- M src/openvpn/options.c 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/21/1121/4 diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 3753810..3ceada0 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3527,7 +3527,13 @@ #endif /* if defined(_WIN32) */ /* Copy --dns options to tuntap_options */ + const struct dns_domain *d = dns->search_domains; + if (d) + { + tt->domain_search_list_len = 0; + } + while (d && tt->domain_search_list_len + 1 < N_SEARCH_LIST_LEN) { tt->domain_search_list[tt->domain_search_list_len++] = d->name; @@ -3538,6 +3544,9 @@ msg(M_WARN, "WARNING: couldn't copy all --dns search-domains to TUN/TAP"); } + tt->dns_len = 0; + tt->dns6_len = 0; + const struct dns_server *s = dns->servers; while (s) { @@ -6212,6 +6221,8 @@ } o->disable_nbt = 0; o->dhcp_options = 0; + + CLEAR(options->dns_options.from_dhcp); #if defined(TARGET_ANDROID) o->http_proxy_port = 0; o->http_proxy = NULL; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Gerrit-Change-Number: 1121 Gerrit-PatchSet: 4 Gerrit-Owner: stipa <lst...@gm...> Gerrit-Reviewer: d12fk <he...@op...> Gerrit-Reviewer: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-MessageType: newpatchset |
From: cron2 (C. Review) <ge...@op...> - 2025-07-31 12:57:00
|
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email ) Change subject: Fix DNS options duplication on PUSH_UPDATE ...................................................................... Fix DNS options duplication on PUSH_UPDATE Commit 2dfc4f ("dns: deal with --dhcp-options when --dns is active") has removed reset of tuntap DNS options. Due to that, incoming --dns options are added to existing ones instead of overwriting them. It has also added a new storage for --dhcp-option. The push-update code didn't clear it and as a result, incoming --dhcp-option options were added to existing ones instead of overwriting them. Fixed by: - resetting tuntap DNS options (regression from abovementioned commit) - clearing dhcp options storage in push-update code GitHub: fixes OpenVPN/openvpn#804 Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Signed-off-by: Lev Stipakov <le...@op...> Acked-by: Heiko Hund <he...@op...> Message-Id: <202...@gr...> URL: https://www.mail-archive.com/ope...@li.../msg32448.html Signed-off-by: Gert Doering <ge...@gr...> --- M src/openvpn/options.c 1 file changed, 11 insertions(+), 0 deletions(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 3753810..3ceada0 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3527,7 +3527,13 @@ #endif /* if defined(_WIN32) */ /* Copy --dns options to tuntap_options */ + const struct dns_domain *d = dns->search_domains; + if (d) + { + tt->domain_search_list_len = 0; + } + while (d && tt->domain_search_list_len + 1 < N_SEARCH_LIST_LEN) { tt->domain_search_list[tt->domain_search_list_len++] = d->name; @@ -3538,6 +3544,9 @@ msg(M_WARN, "WARNING: couldn't copy all --dns search-domains to TUN/TAP"); } + tt->dns_len = 0; + tt->dns6_len = 0; + const struct dns_server *s = dns->servers; while (s) { @@ -6212,6 +6221,8 @@ } o->disable_nbt = 0; o->dhcp_options = 0; + + CLEAR(options->dns_options.from_dhcp); #if defined(TARGET_ANDROID) o->http_proxy_port = 0; o->http_proxy = NULL; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1121?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ife4d8fc5f8e2183e61226d66a76bbaa02c06f787 Gerrit-Change-Number: 1121 Gerrit-PatchSet: 4 Gerrit-Owner: stipa <lst...@gm...> Gerrit-Reviewer: d12fk <he...@op...> Gerrit-Reviewer: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-MessageType: merged |