This has been unused since Q, when the NAT64 prefix started being detected and passed in by netd instead. Many things depend on the prefix being correct, including clat BPF offload and DNS64 synthesis, and doing DNS64 detection in clatd provides no way to make these work. Additionally, R now supports getting the NAT64 prefix via the RA, which makes DNS64 detection in clatd even less useful. This CL removes all the DNS64 detection code. The new code parses the prefix in main.c, and if the prefix is not valid, refuses to start. This also lets us remove the -n <netid> parameter which was only used for DNS64 detection. It also removes a dependency on dnsproxyd_protocol_headers, which should be depended on by as few parts of the system as possible. Test: m Bug: 144730808 Bug: 151895202 Test: IPv6-only wifi continues to work Change-Id: I892f364d6cbfe76277686387e35c04d3d6eb5ecc
95 lines
1.8 KiB
Text
95 lines
1.8 KiB
Text
cc_defaults {
|
|
name: "clatd_defaults",
|
|
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
"-Wunused-parameter",
|
|
|
|
// Bug: http://b/33566695
|
|
"-Wno-address-of-packed-member",
|
|
],
|
|
|
|
// For MARK_UNSET.
|
|
header_libs: [
|
|
"libnetd_client_headers"
|
|
],
|
|
}
|
|
|
|
// Code used both by the daemon and by unit tests.
|
|
filegroup {
|
|
name: "clatd_common",
|
|
srcs: [
|
|
"config.c",
|
|
"clatd.c",
|
|
"dump.c",
|
|
"getaddr.c",
|
|
"icmp.c",
|
|
"ipv4.c",
|
|
"ipv6.c",
|
|
"logging.c",
|
|
"netlink_callbacks.c",
|
|
"netlink_msg.c",
|
|
"ring.c",
|
|
"setif.c",
|
|
"translate.c",
|
|
],
|
|
}
|
|
|
|
// The clat daemon.
|
|
cc_binary {
|
|
name: "clatd",
|
|
defaults: ["clatd_defaults"],
|
|
srcs: [
|
|
":clatd_common",
|
|
"main.c"
|
|
],
|
|
static_libs: ["libnl"],
|
|
shared_libs: [
|
|
"libcutils",
|
|
"liblog",
|
|
"libnetutils",
|
|
],
|
|
|
|
// Only enable clang-tidy for the daemon, not the tests, because enabling it for the
|
|
// tests substantially increases build/compile cycle times and doesn't really provide a
|
|
// security benefit.
|
|
tidy: true,
|
|
tidy_checks: [
|
|
"-*",
|
|
"cert-*",
|
|
"clang-analyzer-security*",
|
|
"android-*",
|
|
],
|
|
tidy_flags: [
|
|
"-warnings-as-errors=clang-analyzer-security*,cert-*,android-*",
|
|
],
|
|
}
|
|
|
|
// The configuration file.
|
|
prebuilt_etc {
|
|
name: "clatd.conf",
|
|
src: "clatd.conf",
|
|
}
|
|
|
|
// Unit tests.
|
|
cc_test {
|
|
name: "clatd_test",
|
|
defaults: ["clatd_defaults"],
|
|
srcs: [
|
|
":clatd_common",
|
|
"clatd_test.cpp"
|
|
],
|
|
static_libs: [
|
|
"libbase",
|
|
"libnetd_test_tun_interface",
|
|
"libnl",
|
|
],
|
|
shared_libs: [
|
|
"libcutils",
|
|
"liblog",
|
|
"libnetutils",
|
|
],
|
|
test_suites: ["device-tests"],
|
|
require_root: true,
|
|
}
|