aboutsummaryrefslogtreecommitdiffstats
path: root/libc/netbsd/resolv/res_send.c
diff options
context:
space:
mode:
authorGeremy Condra <gcondra@google.com>2012-06-08 21:06:33 -0700
committerGeremy Condra <gcondra@google.com>2012-06-11 11:44:48 -0700
commit524c87c61c1d39dd60aaa8ae01ec3528ce212288 (patch)
treef9721ed559801e4e404e94a14f59ea758f77e85c /libc/netbsd/resolv/res_send.c
parent76656afc6dd069fcfda5768e6e54bb85e4e99942 (diff)
downloadandroid_bionic-524c87c61c1d39dd60aaa8ae01ec3528ce212288.tar.gz
android_bionic-524c87c61c1d39dd60aaa8ae01ec3528ce212288.tar.bz2
android_bionic-524c87c61c1d39dd60aaa8ae01ec3528ce212288.zip
Added event logging for some spoofed DNS queries.
Change-Id: I40909306e8cf922f1dd5a5685db89f732a709794
Diffstat (limited to 'libc/netbsd/resolv/res_send.c')
-rw-r--r--libc/netbsd/resolv/res_send.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libc/netbsd/resolv/res_send.c b/libc/netbsd/resolv/res_send.c
index dbad6dda0..53c492f33 100644
--- a/libc/netbsd/resolv/res_send.c
+++ b/libc/netbsd/resolv/res_send.c
@@ -1144,6 +1144,9 @@ retry:
* XXX - potential security hazard could
* be detected here.
*/
+#ifdef ANDROID_CHANGES
+ __libc_android_log_event_uid(BIONIC_EVENT_RESOLVER_OLD_RESPONSE);
+#endif
DprintQ((statp->options & RES_DEBUG) ||
(statp->pfcode & RES_PRF_REPLY),
(stdout, ";; old answer:\n"),
@@ -1157,6 +1160,9 @@ retry:
* XXX - potential security hazard could
* be detected here.
*/
+#ifdef ANDROID_CHANGES
+ __libc_android_log_event_uid(BIONIC_EVENT_RESOLVER_WRONG_SERVER);
+#endif
DprintQ((statp->options & RES_DEBUG) ||
(statp->pfcode & RES_PRF_REPLY),
(stdout, ";; not our server:\n"),
@@ -1187,6 +1193,9 @@ retry:
* XXX - potential security hazard could
* be detected here.
*/
+#ifdef ANDROID_CHANGES
+ __libc_android_log_event_uid(BIONIC_EVENT_RESOLVER_WRONG_QUERY);
+#endif
DprintQ((statp->options & RES_DEBUG) ||
(statp->pfcode & RES_PRF_REPLY),
(stdout, ";; wrong query name:\n"),