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

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

diff --git a/plugins/ofono.c b/plugins/ofono.c
index 1617764..29dfe90 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -757,6 +757,8 @@ static void extract_ipv4_settings(DBusMessageIter *array,
 
        connman_ipaddress_free(context->ipv4_address);
        context->ipv4_address = NULL;
+       g_free(context->ipv4_nameservers);
+       context->ipv4_nameservers = NULL;
        context->index = -1;
 
        if (dbus_message_iter_get_arg_type(array) != DBUS_TYPE_ARRAY)
@@ -860,6 +862,8 @@ static void extract_ipv6_settings(DBusMessageIter *array,
 
        connman_ipaddress_free(context->ipv6_address);
        context->ipv6_address = NULL;
+       g_free(context->ipv6_nameservers);
+       context->ipv6_nameservers = NULL;
        context->index = -1;
 
        if (dbus_message_iter_get_arg_type(array) != DBUS_TYPE_ARRAY)
-- 
2.1.0

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

Reply via email to