diff options
author | Chad Brubaker <cbrubaker@google.com> | 2013-06-20 10:36:56 -0700 |
---|---|---|
committer | Chad Brubaker <cbrubaker@google.com> | 2013-07-09 13:16:22 -0700 |
commit | c39214e0ac49b9f7de6fd9989331145c6e1cd584 (patch) | |
tree | 5ef63d5680da7dba44b39afc8b77b5d7da4cb503 /libc/netbsd/resolv/res_init.c | |
parent | 33ae76abf32b8f78799e9ebb1de2343dfa10c91a (diff) |
Add marking of DNS sockets for mark based routing
Adds an extra mark parameter to android_getaddrinfoforiface,
android_gethostbyaddrforiface and android_gethostbynameforiface that if set
will cause all packets sent by DNS requests to have that mark
Change-Id: I6f72390e4ce5bfc3cc73183f9b2fb3705a11685f
Diffstat (limited to 'libc/netbsd/resolv/res_init.c')
-rw-r--r-- | libc/netbsd/resolv/res_init.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libc/netbsd/resolv/res_init.c b/libc/netbsd/resolv/res_init.c index ff6529944..ceb412b85 100644 --- a/libc/netbsd/resolv/res_init.c +++ b/libc/netbsd/resolv/res_init.c @@ -806,4 +806,11 @@ void res_setiface(res_state statp, const char* iface) } } } + +void res_setmark(res_state statp, int mark) +{ + if (statp != NULL) { + statp->_mark = mark; + } +} #endif /* ANDROID_CHANGES */ |