summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add extra (size_t) cast to avoid compiler warning.cm-14.1Lorenzo Colitti2017-10-021-1/+1
| | | | | | | | Bug: 64575136 Test: builds Change-Id: I2ca72d89882e9d41803dd80055cbae2f74e73412 Merged-In: Ia33235230b73cb1a828a65dc3a8d1d396fc37d26 (cherry picked from commit 1387a89b143a37b3ab524feaf2af8c2c8d025c3f)
* Make dnsmasq more stable.Lorenzo Colitti2017-10-021-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)
* Log and ignore unusable interfaces from update_ifacesErik Kline2016-09-132-3/+15
|\ | | | | | | | | | | am: 61b542ef37 Change-Id: I142bd84bd7d24e46ec5a5eca8aec5802fdcbfa0f
| * Log and ignore unusable interfaces from update_ifacesErik Kline2016-09-122-3/+15
|/ | | | | Bug: 30882741 Change-Id: I198607a293bb8da8d09330933065e0d10d52916b
* Admit that dnsmasq relies on BSD extensions.Elliott Hughes2016-05-181-1/+1
|\ | | | | | | | | | | | | | | | | am: 1a744d4fe4 * commit '1a744d4fe44ce7a32f1b395b0f4d90fca61c2c82': Admit that dnsmasq relies on BSD extensions. Change-Id: Iad5738f5a69301e69ea037c0cb6075589e2554c5
| * Admit that dnsmasq relies on BSD extensions.staging/cm-14.0Elliott Hughes2016-05-181-1/+1
|/ | | | | | | Change-Id: I926a39980bd4d7475e80a3425c567b7923ede8fa (cherry picked from commit 8b1654b37f42c6d7c241fdf547d55c0e89aaeb43) BUG: 28839081
* Build dnsmasq with IPv6 support.Erik Kline2015-11-261-1/+1
| | | | | Bug: 9580643 Change-Id: I530435a214cb1f57865ca56d367b21a890c09f0d
* Add TODOs for IPv6 support.Lorenzo Colitti2015-11-263-0/+5
| | | | | Bug: 9580643 Change-Id: I131fcd0716f0e048dbf63c01db4ce95780c41dbb
* Improve address parsing/printing and support scoped addresses.Lorenzo Colitti2015-11-264-67/+79
| | | | | | | | | | | | | | | | | | 1. Add a parse_addr function that parses an IP address. This simplifies the code and also supports scoped addresses. 2. Make prettyprint_addr use getnameinfo instead of inet_ntop so it can support scoped addresses. 3. Modify the IPv6 address enumeration code to set the scope ID only if the address is link-local, since scope IDs are only meaningful for link-local addresses Also, we do not want to think that two addresses are different if they differ only in scope ID, because the kernel will treat them as if they are the same. 4. Modify the address equality checks in sockaddr_isequal and iface_check to check the scope ID as well. Bug: 9580643 Change-Id: I84b6b94868e50d7f6c32148b673bed7c080a4456
* Support freeing multiple wildcard listeners.Lorenzo Colitti2015-11-181-23/+43
| | | | | | | | | | Currently, close_bound_listener only frees one listener. This is correct for listeners that are bound to IP addresses, but it is not correct for wildcard listeners, because if IPv6 is enabled there is one wildcard listener per address family. Bug: 9580643 Change-Id: I772ff967e8a2681878f1d7c1f6a114ffdc20dfe7
* Change dnsmasq input command argument separatorErik Kline2015-11-122-6/+8
| | | | | | | | | | | | Heretofore netd issued commands to dnsmasq over a stdin channel using ":" as an argument separator. This make it very complicated to issue commands that involve IPv6 addresses. This changes the separator from ":" to "|". Bug: 9580643 Change-Id: If62147e12c6e3dc9448cae0d3e20fa989cf19b95
* Merge "dnsmasq: Disable DNS server updation via STDIN on Brillo."Roshan Pius2015-10-303-8/+8
|\ | | | | | | | | | | | | am: a7ca662bcb * commit 'a7ca662bcb928e9e921b0d3fc4c862a2a91c3183': dnsmasq: Disable DNS server updation via STDIN on Brillo.
| * Merge "dnsmasq: Disable DNS server updation via STDIN on Brillo."Roshan Pius2015-10-303-8/+8
| |\
| | * dnsmasq: Disable DNS server updation via STDIN on Brillo.Roshan Pius2015-10-303-8/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Brillo starts dnsmasq with STDIN redirected to /dev/null and we don't need the feature to update the DNS servers via STDIN. So, disabling the feature (commit id: 33b34445) for Brillo devices. BUG: 25193399 TEST: Manual tests below: 1. Bootstrapped Edison and connected to a Wifi AP. 2. Verified the `top` output to ensure that dnsmasq wasn't hogging CPU. 3. Verified via `strace` that dnsmasq is no longer listening to /dev/null. Change-Id: Ibc7c671a933904471b76ac6ce20f8490c9b0856c
* | am b955ca6b: am 96590334: am 0e86c5a1: am 7a12cb36: am 4e0ada97: Properly ↵Erik Kline2015-08-200-0/+0
|\| | | | | | | | | | | | | initialize struct irec pointers after malloc() * commit 'b955ca6befab20bc858dcaa6dc1f7f081725f2ac': Properly initialize struct irec pointers after malloc()
| * am 96590334: am 0e86c5a1: am 7a12cb36: am 4e0ada97: Properly initialize ↵Erik Kline2015-08-200-0/+0
| |\ | | | | | | | | | | | | | | | | | | struct irec pointers after malloc() * commit '965903348a4fd412cba34b1ea4dd9bda46652fdc': Properly initialize struct irec pointers after malloc()
| | * am 0e86c5a1: am 7a12cb36: am 4e0ada97: Properly initialize struct irec ↵Erik Kline2015-08-201-0/+2
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | pointers after malloc() * commit '0e86c5a1d5f45e700cad5d7ed47c2b298e6e170b': Properly initialize struct irec pointers after malloc()
| | | * am 7a12cb36: am 4e0ada97: Properly initialize struct irec pointers after ↵Erik Kline2015-08-181-0/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | malloc() * commit '7a12cb364297118947f9ce9786f94a47eb710ce8': Properly initialize struct irec pointers after malloc()
| | | | * am 4e0ada97: Properly initialize struct irec pointers after malloc()Erik Kline2015-08-181-0/+2
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | * commit '4e0ada9701a819193e25f58e196fc47f9ad8c606': Properly initialize struct irec pointers after malloc()
| | | | | * Properly initialize struct irec pointers after malloc()Erik Kline2015-08-151-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 (cherry picked from commit f16178371856ff9b9d739e5b7122f1e82ee1d681)
* | | | | | Merge "package version metadata for external/"Bill Napier2015-07-301-0/+3
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | package version metadata for external/Damien Miller2015-06-021-0/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be used for automated notification of external vulnerability reports. Change-Id: Ia52720e73710a1d36fafbcc12d89cab261ef9e78
* / / / / 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
* | | | am f0f842ad: am e226badb: Fixup existing listeners struct irec pointers.Erik Kline2014-10-260-0/+0
|\ \ \ \ | | | | | | | | | | | | | | | * commit 'f0f842adf0d07ddc6d3338b7098310756b7c6f35':
| * | | | am e226badb: Fixup existing listeners struct irec pointers.Erik Kline2014-10-021-3/+31
| |\| | | | | | | | | | | | | | | | | | | | | | | * commit 'e226badb960695447af4c480bb183ec35c411bbf': Fixup existing listeners struct irec pointers.
* | | | | am e226badb: Fixup existing listeners struct irec pointers.Erik Kline2014-10-021-3/+31
|\ \ \ \ \ | |/ / / / |/| / / / | |/ / / | | | | * commit 'e226badb960695447af4c480bb183ec35c411bbf': Fixup existing listeners struct irec pointers.
| * | | 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
* | | | am 68eff53e: Allow configuring a socket mark for DNS packets.Lorenzo Colitti2014-09-033-14/+44
|\| | | | | | | | | | | | | | | | | | | * commit '68eff53e7ed9df06f194478930f39b31c7a32458': Allow configuring a socket mark for DNS packets.
| * | | 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
* | | | am d1b102a5: am ef815e0c: Fix dnsmasq \'_PATH_LOG\' undeclared build error.Elliott Hughes2014-08-180-0/+0
|\| | | | | | | | | | | | | | | | | | | * commit 'd1b102a58056b842bf81e0846b2d4a21e7c964eb': Fix dnsmasq '_PATH_LOG' undeclared build error.
| * | | am ef815e0c: Fix dnsmasq \'_PATH_LOG\' undeclared build error.Elliott Hughes2014-08-180-0/+0
| |\| | | | | | | | | | | | | | | | | | * commit 'ef815e0c09f9b45868ee73a09cf7186b23b899d3': Fix dnsmasq '_PATH_LOG' undeclared build error.
| | * | Fix dnsmasq '_PATH_LOG' undeclared build error.Elliott Hughes2014-08-151-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | This change came from upstream, presumably so they can build against the NDK. (cherry picked from commit 70eeec149a396b7c457d05de9e38d270a861b9fa) Change-Id: Ic8df0bcf2c1a0619005e6a87ee467e1242da22fe
* | | am 23d6d5c5: Fix dnsmasq \'_PATH_LOG\' undeclared build error.Elliott Hughes2014-07-220-0/+0
|\| | | | | | | | | | | | | | * commit '23d6d5c524cd8bb0dcba45ffa9dd546b507e7e30': Fix dnsmasq '_PATH_LOG' undeclared build error.
| * | 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
* | Merge "Fix dnsmasq '_PATH_LOG' undeclared build error."Elliott Hughes2014-07-191-1/+1
|\ \ | |/ |/|
| * 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. Change-Id: Iee38c615ac0bbacb3afb91e11f52281abbc1ce70
* 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
* am ad7502a6: Merge "Ensure all commands read on dnsmasq\'s stdin are processed"Jean-Baptiste Queru2012-06-021-15/+23
|\ | | | | | | | | * commit 'ad7502a6aeff431e9759e57734474576d4b085e7': Ensure all commands read on dnsmasq's stdin are processed
| * Merge "Ensure all commands read on dnsmasq's stdin are processed"Jean-Baptiste Queru2012-06-021-15/+23
| |\
| | * 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>
* / Remove obsolete ThirdPartyProject.prop file.Elliott Hughes2012-05-151-9/+0
|/ | | | Change-Id: I95e6f923a13322003096e67aeaaf5199624ab980
* Remove the simulator target from all makefiles.Jeff Brown2011-07-111-2/+0
| | | | | | Bug: 5010576 Change-Id: Ie5fcad1808bcced3198dc650816373e2f7567e54
* 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
* add meta-files about 3rd party projectsThe Android Open Source Project2010-07-161-0/+9
| | | | Change-Id: I84244ea72c1a603cc4342da13f67831dcd8eaf34
* Add an empty CleanSpec.mkJean-Baptiste Queru2010-03-081-0/+49
| | | | Change-Id: I9baee49df0139f5131d5a83f6d03fb2aa7a30f46
* Remove a noisy logger.Robert Greenwalt2010-02-241-10/+3
| | | | Used by tethering, this would get very noisy if you had wifi active.
* dnsmasq: add empty MODULE_LICENSE_GPLSan Mehat2010-01-201-0/+0
| | | | Signed-off-by: San Mehat <san@google.com>
* dnsmasq: Include GPLv2 notice fileSan Mehat2010-01-201-0/+340
| | | | Signed-off-by: San Mehat <san@google.com>
* dnsmasq: Allow runtime changing of DNS servers via STDINSan Mehat2010-01-205-2/+182
| | | | Signed-off-by: San Mehat <san@google.com>