cron2 has submitted this change. (
http://gerrit.openvpn.net/c/openvpn/+/1181?usp=email )
Change subject: Preserve --dhcp-option values from local config
......................................................................
Preserve --dhcp-option values from local config
Commit
2dfc4f8 ("dns: deal with --dhcp-options when --dns is active")
has changed the way how --dhcp-option values are stored. Instead of
storing them directly in tuntap_options, they are now stored in
dns_options->from_dhcp.
Before connect, we save options before --pull is applied, and for that
we call clone_dns_options(). However, this was missing to clone the
"from_dhcp" struct, and as a result, the values of --dhcp-option from
the local config have been lost.
Fix by adding shallow-copying of dhcp_options to clone_dns_options(). It
is safe to do because it only contains fixed-size arrays, scalar types
and pointers to the strings which this struct doesn't own.
Github: closes OpenVPN/openvpn#839
Github: closes OpenVPN/openvpn#840
Change-Id: I815e68dd5d365743faff2b80783b776d9e8a645c
Signed-off-by: Lev Stipakov <[email protected]>
Acked-by: Frank Lichtenheld <[email protected]>
Message-Id: <[email protected]>
URL:
https://www.mail-archive.com/[email protected]/msg32879.html
URL: https://gerrit.openvpn.net/c/openvpn/+/1181
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/dns.c
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/openvpn/dns.c b/src/openvpn/dns.c
index 8554089..5421004 100644
--- a/src/openvpn/dns.c
+++ b/src/openvpn/dns.c
@@ -264,6 +264,7 @@
clone.servers_prepull = clone_dns_servers(o->servers_prepull, gc);
clone.updown = o->updown;
clone.updown_flags = o->updown_flags;
+ clone.from_dhcp = o->from_dhcp;
return clone;
}
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1181?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: I815e68dd5d365743faff2b80783b776d9e8a645c
Gerrit-Change-Number: 1181
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <[email protected]>
Gerrit-Reviewer: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel