diff options
author | Maciej Żenczykowski <maze@google.com> | 2020-04-08 17:59:30 -0700 |
---|---|---|
committer | Maciej Żenczykowski <maze@google.com> | 2020-04-16 02:43:45 +0000 |
commit | e701b79fa407ff543982e4f25e1756fae409fc47 (patch) | |
tree | 65e9706161970db7cb13441aee6606eee83f2a38 | |
parent | 382119f0e0cccb09f82d20fa9fe45e9132ade0ef (diff) | |
download | iptables-e701b79fa407ff543982e4f25e1756fae409fc47.tar.gz |
merge ip6tables binary into iptables
This saves both disk space and runtime ram:
this is because iptables-restore and ip6tables-restore
are pretty much permanently running as children of netd
(connected via stdin/out pipes).
Almost all the code in both binaries is the same, since
most matches/targets are ip version agnostic.
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie86053f83803f66401576118467acf5738182246
-rw-r--r-- | iptables/Android.bp | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/iptables/Android.bp b/iptables/Android.bp index d146bfb8..91bcb71f 100644 --- a/iptables/Android.bp +++ b/iptables/Android.bp @@ -42,49 +42,26 @@ cc_binary { name: "iptables", defaults: ["iptables_cmd_defaults"], - // Undefine ENABLE_IPV6 (from defaults), since that's handled in ip6tables. - cflags: ["-UENABLE_IPV6"], - srcs: [ "iptables-save.c", "iptables-restore.c", "iptables-standalone.c", "iptables.c", - ], - - static_libs: [ - "libext4", - "libip4tc", - ], - - symlinks: [ - "iptables-save", - "iptables-restore", - ], -} - -//---------------------------------------------------------------- -// ip6tables -cc_binary { - name: "ip6tables", - defaults: ["iptables_cmd_defaults"], - - // Undefine ENABLE_IPV4 (from defaults), since that's handled in iptables. - cflags: ["-UENABLE_IPV4"], - - srcs: [ - "iptables-save.c", - "iptables-restore.c", "ip6tables-standalone.c", "ip6tables.c", ], static_libs: [ + "libext4", "libext6", + "libip4tc", "libip6tc", ], symlinks: [ + "iptables-save", + "iptables-restore", + "ip6tables", "ip6tables-save", "ip6tables-restore", ], |