From: Pasi Sjöholm <[email protected]>

Nameservers need to be reset when new addresses are extracted
if method is not FIXED so that they are not reused when
pdp-protocol e.g. changes from ipv6 to dual/ipv4v6.
---
 plugins/ofono.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/plugins/ofono.c b/plugins/ofono.c
index b60e7ba..94c6536 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -840,6 +840,9 @@ static void extract_ipv4_settings(DBusMessageIter *array,
 
                g_free(context->ipv4_nameservers);
                context->ipv4_nameservers = nameservers;
+       } else {
+               g_free(context->ipv4_nameservers);
+               context->ipv4_nameservers = NULL;
        }
 
 out:
@@ -934,6 +937,8 @@ static void extract_ipv6_settings(DBusMessageIter *array,
        } else {
                context->index = index;
                context->ipv6_method = CONNMAN_IPCONFIG_METHOD_AUTO;
+               g_free(context->ipv6_nameservers);
+               context->ipv6_nameservers = NULL;
        }
 
 out:
-- 
2.1.0

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to