diff options
author | Simon Kelley <simon@thekelleys.org.uk> | 2014-06-08 21:51:29 +0100 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2014-06-08 21:51:29 +0100 |
commit | 006c162382aaa30f63413b876ecbe805280c3d36 (patch) | |
tree | b4b0122a3c2c5a9e813d99a4506e2c57c4202b29 | |
parent | 6799a466055fa34d07d6e7672269b9c8cbcca3d7 (diff) | |
download | dnsmasq-006c162382aaa30f63413b876ecbe805280c3d36.tar.gz |
Fix bug when >1 IPv6 address supplied to Dbus SetServers method.
-rw-r--r-- | src/dbus.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -156,13 +156,16 @@ static void dbus_read_servers(DBusMessage *message) dbus_message_iter_get_basic(&iter, &p[i]); dbus_message_iter_next (&iter); if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_BYTE) - break; + { + i++; + break; + } } #ifndef HAVE_IPV6 my_syslog(LOG_WARNING, _("attempt to set an IPv6 server address via DBus - no IPv6 support")); #else - if (i == sizeof(struct in6_addr)-1) + if (i == sizeof(struct in6_addr)) { memcpy(&addr.in6.sin6_addr, p, sizeof(struct in6_addr)); #ifdef HAVE_SOCKADDR_SA_LEN |