diff options
author | rich cannings <richc@google.com> | 2011-02-09 13:24:37 -0800 |
---|---|---|
committer | rich cannings <richc@google.com> | 2011-02-09 13:24:37 -0800 |
commit | f06d4c7c55e8b60c27c9be6f824eb41464a0926d (patch) | |
tree | 760b9c298c8fe37411e174f7bd214ff644cda0ec /slirp-android | |
parent | 1b0e2cf0d8b9b95ca2615adcc30dad4c481b88fc (diff) | |
download | external_qemu-f06d4c7c55e8b60c27c9be6f824eb41464a0926d.zip external_qemu-f06d4c7c55e8b60c27c9be6f824eb41464a0926d.tar.gz external_qemu-f06d4c7c55e8b60c27c9be6f824eb41464a0926d.tar.bz2 |
"Negative" DNS IP address fix
The DNS server IP is stored in a 32-bit signed int. Thus, no IP address
beyond 128.0.0.0 was allowed to be set as DNS server.
This change allows for DNS servers to have any IP addresses, except
255.255.255.255 (equivalent to -1 in a 32-bit signed int).
Change-Id: I367f46a1de578b0cd123f14f564685c4564aab4e
Diffstat (limited to 'slirp-android')
-rw-r--r-- | slirp-android/slirp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/slirp-android/slirp.c b/slirp-android/slirp.c index dc94a99..e3c4c42 100644 --- a/slirp-android/slirp.c +++ b/slirp-android/slirp.c @@ -81,7 +81,7 @@ int slirp_add_dns_server(const SockAddress* new_dns_addr) return -1; dns_ip = sock_address_get_ip(new_dns_addr); - if (dns_ip < 0) + if (dns_ip == -1) return -1; dns_addr[dns_addr_count++] = dns_ip; |