summaryrefslogtreecommitdiffstats
path: root/COPYING
diff options
context:
space:
mode:
authorErik Kline <ek@google.com>2014-09-30 16:06:37 +0900
committerErik Kline <ek@google.com>2014-09-30 18:46:23 +0900
commite226badb960695447af4c480bb183ec35c411bbf (patch)
tree3408a161e6f4093bb2f32367ae9202bc5b505a4b /COPYING
parent68eff53e7ed9df06f194478930f39b31c7a32458 (diff)
downloadandroid_external_dnsmasq-e226badb960695447af4c480bb183ec35c411bbf.tar.gz
android_external_dnsmasq-e226badb960695447af4c480bb183ec35c411bbf.tar.bz2
android_external_dnsmasq-e226badb960695447af4c480bb183ec35c411bbf.zip
Fixup existing listeners struct irec pointers.
This fixes a difficult to diagnose bug in which when closing old listeners and creating new listeners, any listeners which stick around are regrettably left with their iface pointer pointing to a struct irec that is free()d at the end of the set_interfaces() call. This results in a situation where subsequent malloc()s can reuse this memory which, when written to, corrupts the listener's concept of its listening address (by overwriting iface.addr). This mean that when this listener is later closed because, say, tethering on its interface has been removed, the close logic is comparing IPv4 socket addresses with possible garbage, resulting in the socket not being closed because no matching listening address is found. Because the socket is never closed, if the interface is later re-added the bind() to the interface address fails with EADDRINUSE. Also: fix a bogus memset() invocation. Bug: 17475756 Change-Id: I369dcd50b1d03db279fdb2c1d7f0e048df21be65
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions