summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add extra (size_t) cast to avoid compiler warning.HEADreplicant-6.0-0004-transitionreplicant-6.0-0004-rc6replicant-6.0-0004-rc5-transitionreplicant-6.0-0004-rc5replicant-6.0-0004-rc4replicant-6.0-0004-rc3replicant-6.0-0004-rc2replicant-6.0-0004-rc1replicant-6.0-0004replicant-6.0-0003cm-13.0Erik Kline2017-10-031-1/+1
| | | | | | | | Bug: 64575136 Test: builds Change-Id: Ia33235230b73cb1a828a65dc3a8d1d396fc37d26 (cherry picked from commit 3b126928a1931ed627d736a8023aed2618b57171) CVE-2017-14496
* Make dnsmasq more stable.Lorenzo Colitti2017-10-031-1/+4
| | | | | | | | | | | | 1. Fix the length check in extract_name. 2. Add a size check to answer_request. Bug: 64575136 Test: builds Test: wifi tethering works Change-Id: Ie38321ab02b7cfdc603958a884cd8f37724fedcc (cherry picked from commit f25df861463c07908f39d9b43fe8888a4b31e848) CVE-2017-14496
* Properly initialize struct irec pointers after malloc()Erik Kline2015-06-301-0/+2
| | | | | | | | | Failing to properly initialize struct irec pointers to NULL after malloc()ing structs that contain them makes subsequent comparison of said pointers to NULL unreliable, to say the least. Bug: 21411241 Change-Id: Id51c17a013250a5a80c867f7e074a70e0e3cc5e3
* Fixup existing listeners struct irec pointers.Erik Kline2014-09-301-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Allow configuring a socket mark for DNS packets.Lorenzo Colitti2014-08-273-14/+44
| | | | | | | | | | | | | | This allows dnsmasq to send DNS queries on a non-default network (e.g., the DUN APN). We add support for a mark instead of using existing code to bind DNS servers to interfaces because: 1. Marks are more flexible, and we use them elsewhere. 2. The existing code to bind DNS servers to interfaces causes the DNS socket to be bound to a constant port, which exposes us to a Kaminsky attack. Bug: 16357676 Change-Id: I8933b6de198a92c2aaf0291931ace8966ddba275
* Fix dnsmasq '_PATH_LOG' undeclared build error.Elliott Hughes2014-07-211-1/+1
| | | | | | | | This change came from upstream, presumably so they can build against the NDK. (cherry picked from commit 70eeec149a396b7c457d05de9e38d270a861b9fa) Change-Id: Idca02fba6fd31e60fdd5710973c98e07ac71a7bc
* Add liblogYing Wang2013-04-091-2/+2
| | | | | Bug: 8580410 Change-Id: I0e478ef39bfdc83adaa8cbbd9c1b5a6b0d28bb39
* Only listen on the given interfaces.Robert Greenwalt2012-12-143-7/+276
| | | | | | | Stop being a public dns forwarder on our external interfaces. bug:7530468 Change-Id: Ic94cd66e66371de4fcc54f53b9f267f6611804b8
* Ensure all commands read on dnsmasq's stdin are processedPierre Crépieux2012-05-311-15/+23
| | | | | | | | | | | | As described in issue 30016, android dnsmasq daemon is misconfigured after initializing tethering. The reason is that two commands are present on dnsmasq stdin when check_android_listeners is called: update_dns:8.8.8.8:8.8.4.4\0update_dns:192.x.y.z (notice the \0 between the 2 commands). check_android_listeners assumes there is a single NUL terminated string and skip the second one. This patch ensure that every commands are processed by checking wether or not all the characters on stdin have been consumed and loop if needed. Also fixes style issues. Change-Id: I6d98233964559b8dcc1253aec105a240e1065c94 Signed-off-by: Pierre Crépieux <pierre.crepieux@orange.com>
* Add missing NOTICE files.David Deephanphongs2010-10-191-0/+340
| | | | | | | Copy NOTICE file from location in root into subdirectories where it will be picked up by the build system. Change-Id: Ie648543f307686d44b2010133c1027e8d5c7d34a
* Remove a noisy logger.Robert Greenwalt2010-02-241-10/+3
| | | | Used by tethering, this would get very noisy if you had wifi active.
* dnsmasq: Allow runtime changing of DNS servers via STDINSan Mehat2010-01-205-2/+182
| | | | Signed-off-by: San Mehat <san@google.com>
* dnsmasq: Tweak for building on AndroidSan Mehat2010-01-206-6/+404
| | | | Signed-off-by: San Mehat <san@google.com>
* dnsmasq: Direct import of version 2.51San Mehat2010-01-2018-0/+17254
Signed-off-by: San Mehat <san@google.com>