Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 154ebe80 authored by Sreeram Ramachandran's avatar Sreeram Ramachandran
Browse files

Introduce netd_client, a dynamic library that talks to netd.

This library is dynamically loaded and used by bionic, to replace selected
standard socket syscalls with versions that talk to netd.

Implement connect() by requesting that the socket be marked with the netId of
the default network and then calling through to the actual syscall.

There are two escape hatches:

+ If the fwmark server is unavailable, it isn't an error; we proceed with the
  syscall. This might help at boot time (when the server isn't ready yet) and if
  we get rid of the fwmarkd socket entirely in future platform versions.

+ If the ANDROID_NO_USE_FWMARK_CLIENT environment variable is set, we don't
  attempt to use the fwmark server (even if it's available). This allows apps to
  sidestep unforseen issues in production at runtime.

(cherry picked from commit 0581cb455ef924f128a5c6d46bc70868b5099eec)

Change-Id: Ib6198e19dbc306521a26fcecfdf6e8424d163fc9
parent e38d4707
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment