1. psiphon
  2. Psiphon Circumvention System
  3. Issues
Issue #174 new

iptables source adapted from android-4.1.1_r4?

A Kruger
created an issue

Originally posted on launchpad

Asked by Pragmatic Software

I've observed that the commit message for Psiphon's Android iptables ( https://bitbucket.org/psiphon/psiphon-circumvention-system/src/5e71750fcf52/Android/iptables ) says "Adapted iptables from android source branch android-4.1.1_r4."

Yet when I look at the AOSP source for that branch ( https://android.googlesource.com/platform/external/iptables.git/+/android-4.1.1_r4 ), the code is very, very different.

I've also compared the Psiphon iptables source against the netfilter version ( http://www.netfilter.org/projects/iptables/files/iptables-1.4.17.tar.bz2 ), and it is still quite different.

I wonder if I'm looking at the correct original repositories from which you adapted the iptables source? Can you provide a link to from where you obtain the iptables source(s)? What was your guide in making the modifications, if any were made by this team?

Comments (3)

  1. A Kruger reporter

    The original repository from which our iptables source was adapted is https://android.googlesource.com/platform/external/iptables.git/+/android-4.1.1_r4.

    I used the following commands to obtain the original sources:

    git clone https://android.googlesource.com/platform/external/iptables
    git checkout android-4.1.1_r4
    

    A diff of the original sources and ours follows:

    # diff -r iptables/ psiphon-circumvention-system/Android/iptables/jni/
    Only in psiphon-circumvention-system/Android/iptables/jni/: Application.mk
    diff -r iptables/extensions/Android.mk psiphon-circumvention-system/Android/iptables/jni/extensions/Android.mk
    79c79,80
    < LOCAL_GENERATED_SOURCES:= $(MY_GEN_INITEXT) $(MY_gen_lib_sources)
    ---
    > #LOCAL_GENERATED_SOURCES:= $(MY_GEN_INITEXT) $(MY_gen_lib_sources)
    > LOCAL_SRC_FILES:= $(MY_GEN_INITEXT) $(MY_gen_lib_sources)
    142c143,144
    < LOCAL_GENERATED_SOURCES:= $(MY_GEN_INITEXT4) ${MY_gen_lib_sources}
    ---
    > #LOCAL_GENERATED_SOURCES:= $(MY_GEN_INITEXT4) ${MY_gen_lib_sources}
    > LOCAL_SRC_FILES:= $(MY_GEN_INITEXT4) ${MY_gen_lib_sources}
    205c207,208
    < LOCAL_GENERATED_SOURCES:= $(MY_GEN_INITEXT6) $(MY_gen_lib_sources)
    ---
    > #LOCAL_GENERATED_SOURCES:= $(MY_GEN_INITEXT6) $(MY_gen_lib_sources)
    > LOCAL_SRC_FILES:= $(MY_GEN_INITEXT6) $(MY_gen_lib_sources)
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: initext4.c
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: initext6.c
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: initext.c
    diff -r iptables/extensions/libip6t_ah.c psiphon-circumvention-system/Android/iptables/jni/extensions/libip6t_ah.c
    137c137
    < _init(void)
    ---
    > libip6t_ah_init(void)
    diff -r iptables/extensions/libip6t_dst.c psiphon-circumvention-system/Android/iptables/jni/extensions/libip6t_dst.c
    188c188
    < _init(void)
    ---
    > libip6t_dst_init(void)
    diff -r iptables/extensions/libip6t_eui64.c psiphon-circumvention-system/Android/iptables/jni/extensions/libip6t_eui64.c
    12c12
    < void _init(void)
    ---
    > void libip6t_eui64_init(void)
    diff -r iptables/extensions/libip6t_frag.c psiphon-circumvention-system/Android/iptables/jni/extensions/libip6t_frag.c
    167c167
    < _init(void)
    ---
    > libip6t_frag_init(void)
    diff -r iptables/extensions/libip6t_hbh.c psiphon-circumvention-system/Android/iptables/jni/extensions/libip6t_hbh.c
    180c180
    < _init(void)
    ---
    > libip6t_hbh_init(void)
    diff -r iptables/extensions/libip6t_HL.c psiphon-circumvention-system/Android/iptables/jni/extensions/libip6t_HL.c
    124c124
    < void _init(void)
    ---
    > void libip6t_HL_init(void)
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libip6t_hl_.c
    Only in iptables/extensions: libip6t_hl.c
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libip6t_hl_.man
    Only in iptables/extensions: libip6t_hl.man
    diff -r iptables/extensions/libip6t_icmp6.c psiphon-circumvention-system/Android/iptables/jni/extensions/libip6t_icmp6.c
    236c236
    < void _init(void)
    ---
    > void libip6t_icmp6_init(void)
    diff -r iptables/extensions/libip6t_ipv6header.c psiphon-circumvention-system/Android/iptables/jni/extensions/libip6t_ipv6header.c
    242c242
    < void _init(void)
    ---
    > void libip6t_ipv6header_init(void)
    diff -r iptables/extensions/libip6t_LOG.c psiphon-circumvention-system/Android/iptables/jni/extensions/libip6t_LOG.c
    181c181
    < void _init(void)
    ---
    > void libip6t_LOG_init(void)
    diff -r iptables/extensions/libip6t_mh.c psiphon-circumvention-system/Android/iptables/jni/extensions/libip6t_mh.c
    225c225
    < void _init(void)
    ---
    > void libip6t_mh_init(void)
    diff -r iptables/extensions/libip6t_REJECT.c psiphon-circumvention-system/Android/iptables/jni/extensions/libip6t_REJECT.c
    137c137
    < void _init(void)
    ---
    > void libip6t_REJECT_init(void)
    diff -r iptables/extensions/libip6t_rt.c psiphon-circumvention-system/Android/iptables/jni/extensions/libip6t_rt.c
    255c255
    < _init(void)
    ---
    > libip6t_rt_init(void)
    diff -r iptables/extensions/libipt_addrtype.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_addrtype.c
    305c305
    < void _init(void) 
    ---
    > void libipt_addrtype_init(void) 
    diff -r iptables/extensions/libipt_ah.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_ah.c
    102c102
    < _init(void)
    ---
    > libipt_ah_init(void)
    diff -r iptables/extensions/libipt_CLUSTERIP.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_CLUSTERIP.c
    192c192
    < void _init(void)
    ---
    > void libipt_CLUSTERIP_init(void)
    diff -r iptables/extensions/libipt_DNAT.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_DNAT.c
    256c256
    < void _init(void)
    ---
    > void libipt_DNAT_init(void)
    diff -r iptables/extensions/libipt_ECN.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_ECN.c
    142c142
    < void _init(void)
    ---
    > void libipt_ECN_init(void)
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libipt_ecn_.c
    Only in iptables/extensions: libipt_ecn.c
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libipt_ecn_.man
    Only in iptables/extensions: libipt_ecn.man
    diff -r iptables/extensions/libipt_icmp.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_icmp.c
    266c266
    < void _init(void)
    ---
    > void libipt_icmp_init(void)
    diff -r iptables/extensions/libipt_LOG.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_LOG.c
    183c183
    < void _init(void)
    ---
    > void libipt_LOG_init(void)
    diff -r iptables/extensions/libipt_MASQUERADE.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_MASQUERADE.c
    151c151
    < void _init(void)
    ---
    > void libipt_MASQUERADE_init(void)
    diff -r iptables/extensions/libipt_MIRROR.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_MIRROR.c
    12c12
    < void _init(void)
    ---
    > void libipt_MIRROR_init(void)
    diff -r iptables/extensions/libipt_NETMAP.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_NETMAP.c
    103c103
    < void _init(void)
    ---
    > void libipt_NETMAP_init(void)
    diff -r iptables/extensions/libipt_realm.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_realm.c
    124c124
    < void _init(void)
    ---
    > void libipt_realm_init(void)
    diff -r iptables/extensions/libipt_REDIRECT.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_REDIRECT.c
    152c152
    < void _init(void)
    ---
    > void libipt_REDIRECT_init(void)
    diff -r iptables/extensions/libipt_REJECT.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_REJECT.c
    157c157
    < void _init(void)
    ---
    > void libipt_REJECT_init(void)
    diff -r iptables/extensions/libipt_SAME.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_SAME.c
    174c174
    < void _init(void)
    ---
    > void libipt_SAME_init(void)
    diff -r iptables/extensions/libipt_SNAT.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_SNAT.c
    256c256
    < void _init(void)
    ---
    > void libipt_SNAT_init(void)
    diff -r iptables/extensions/libipt_TTL.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_TTL.c
    123c123
    < void _init(void)
    ---
    > void libipt_TTL_init(void)
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libipt_ttl_.c
    Only in iptables/extensions: libipt_ttl.c
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libipt_ttl_.man
    Only in iptables/extensions: libipt_ttl.man
    diff -r iptables/extensions/libipt_ULOG.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_ULOG.c
    125c125
    < void _init(void)
    ---
    > void libipt_ULOG_init(void)
    diff -r iptables/extensions/libipt_unclean.c psiphon-circumvention-system/Android/iptables/jni/extensions/libipt_unclean.c
    12c12
    < void _init(void)
    ---
    > void libipt_unclean_init(void)
    diff -r iptables/extensions/libxt_AUDIT.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_AUDIT.c
    98c98
    < void _init(void)
    ---
    > void libxt_AUDIT_init(void)
    diff -r iptables/extensions/libxt_CHECKSUM.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_CHECKSUM.c
    74c74
    < void _init(void)
    ---
    > void libxt_CHECKSUM_init(void)
    diff -r iptables/extensions/libxt_CLASSIFY.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_CLASSIFY.c
    85c85
    < void _init(void)
    ---
    > void libxt_CLASSIFY_init(void)
    diff -r iptables/extensions/libxt_cluster.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_cluster.c
    143c143
    < void _init(void)
    ---
    > void libxt_cluster_init(void)
    diff -r iptables/extensions/libxt_comment.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_comment.c
    64c64
    < void _init(void)
    ---
    > void libxt_comment_init(void)
    diff -r iptables/extensions/libxt_connbytes.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_connbytes.c
    164c164
    < void _init(void)
    ---
    > void libxt_connbytes_init(void)
    diff -r iptables/extensions/libxt_connlimit.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_connlimit.c
    249c249
    < void _init(void)
    ---
    > void libxt_connlimit_init(void)
    diff -r iptables/extensions/libxt_CONNMARK.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_CONNMARK.c
    383c383
    < void _init(void)
    ---
    > void libxt_CONNMARK_init(void)
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_connmark_.c
    Only in iptables/extensions: libxt_connmark.c
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_connmark_.man
    Only in iptables/extensions: libxt_connmark.man
    diff -r iptables/extensions/libxt_CONNSECMARK.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_CONNSECMARK.c
    109c109
    < void _init(void)
    ---
    > void libxt_CONNSECMARK_init(void)
    diff -r iptables/extensions/libxt_conntrack.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_conntrack.c
    1069c1069
    < void _init(void)
    ---
    > void libxt_conntrack_init(void)
    diff -r iptables/extensions/libxt_cpu.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_cpu.c
    60c60
    < void _init(void)
    ---
    > void libxt_cpu_init(void)
    diff -r iptables/extensions/libxt_CT.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_CT.c
    169c169
    < void _init(void)
    ---
    > void libxt_CT_init(void)
    diff -r iptables/extensions/libxt_devgroup.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_devgroup.c
    177c177
    < void _init(void)
    ---
    > void libxt_devgroup_init(void)
    diff -r iptables/extensions/libxt_DSCP.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_DSCP.c
    109c109
    < void _init(void)
    ---
    > void libxt_DSCP_init(void)
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_dscp_.c
    Only in iptables/extensions: libxt_dscp.c
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_dscp_.man
    Only in iptables/extensions: libxt_dscp.man
    diff -r iptables/extensions/libxt_esp.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_esp.c
    96c96
    < _init(void)
    ---
    > libxt_esp_init(void)
    diff -r iptables/extensions/libxt_hashlimit.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_hashlimit.c
    544c544
    < void _init(void)
    ---
    > void libxt_hashlimit_init(void)
    diff -r iptables/extensions/libxt_helper.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_helper.c
    60c60
    < void _init(void)
    ---
    > void libxt_helper_init(void)
    diff -r iptables/extensions/libxt_IDLETIMER.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_IDLETIMER.c
    93c93
    < void _init(void)
    ---
    > void libxt_IDLETIMER_init(void)
    diff -r iptables/extensions/libxt_iprange.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_iprange.c
    344c344
    < void _init(void)
    ---
    > void libxt_iprange_init(void)
    diff -r iptables/extensions/libxt_LED.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_LED.c
    134c134
    < void _init(void)
    ---
    > void libxt_LED_init(void)
    diff -r iptables/extensions/libxt_length.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_length.c
    72c72
    < void _init(void)
    ---
    > void libxt_length_init(void)
    diff -r iptables/extensions/libxt_limit.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_limit.c
    160c160
    < void _init(void)
    ---
    > void libxt_limit_init(void)
    diff -r iptables/extensions/libxt_mac.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_mac.c
    85c85
    < void _init(void)
    ---
    > void libxt_mac_init(void)
    diff -r iptables/extensions/libxt_MARK.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_MARK.c
    293c293
    < void _init(void)
    ---
    > void libxt_MARK_init(void)
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_mark_.c
    Only in iptables/extensions: libxt_mark.c
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_mark_.man
    Only in iptables/extensions: libxt_mark.man
    diff -r iptables/extensions/libxt_multiport.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_multiport.c
    531c531
    < _init(void)
    ---
    > libxt_multiport_init(void)
    diff -r iptables/extensions/libxt_NFLOG.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_NFLOG.c
    103c103
    < void _init(void)
    ---
    > void libxt_NFLOG_init(void)
    diff -r iptables/extensions/libxt_NFQUEUE.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_NFQUEUE.c
    205c205
    < void _init(void)
    ---
    > void libxt_NFQUEUE_init(void)
    diff -r iptables/extensions/libxt_NOTRACK.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_NOTRACK.c
    12c12
    < void _init(void)
    ---
    > void libxt_NOTRACK_init(void)
    diff -r iptables/extensions/libxt_osf.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_osf.c
    111c111
    < void _init(void)
    ---
    > void libxt_osf_init(void)
    diff -r iptables/extensions/libxt_owner.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_owner.c
    539c539
    < void _init(void)
    ---
    > void libxt_owner_init(void)
    diff -r iptables/extensions/libxt_physdev.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_physdev.c
    145c145
    < void _init(void)
    ---
    > void libxt_physdev_init(void)
    diff -r iptables/extensions/libxt_pkttype.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_pkttype.c
    131c131
    < void _init(void)
    ---
    > void libxt_pkttype_init(void)
    diff -r iptables/extensions/libxt_policy.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_policy.c
    405c405
    < void _init(void)
    ---
    > void libxt_policy_init(void)
    diff -r iptables/extensions/libxt_quota2.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_quota2.c
    138c138
    < void _init(void)
    ---
    > void libxt_quota2_init(void)
    diff -r iptables/extensions/libxt_quota.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_quota.c
    68c68
    < _init(void)
    ---
    > libxt_quota_init(void)
    diff -r iptables/extensions/libxt_RATEEST.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_RATEEST.c
    209c209
    < void _init(void)
    ---
    > void libxt_RATEEST_init(void)
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_rateest_.c
    Only in iptables/extensions: libxt_rateest.c
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_rateest_.man
    Only in iptables/extensions: libxt_rateest.man
    diff -r iptables/extensions/libxt_recent.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_recent.c
    200c200
    < void _init(void)
    ---
    > void libxt_recent_init(void)
    diff -r iptables/extensions/libxt_sctp.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_sctp.c
    506c506
    < void _init(void)
    ---
    > void libxt_sctp_init(void)
    diff -r iptables/extensions/libxt_SECMARK.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_SECMARK.c
    85c85
    < void _init(void)
    ---
    > void libxt_SECMARK_init(void)
    diff -r iptables/extensions/libxt_SET.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_SET.c
    413c413
    < void _init(void)
    ---
    > void libxt_SET_init(void)
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_set_.c
    Only in iptables/extensions: libxt_set.c
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_set_.man
    Only in iptables/extensions: libxt_set.man
    diff -r iptables/extensions/libxt_socket.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_socket.c
    79c79
    < void _init(void)
    ---
    > void libxt_socket_init(void)
    diff -r iptables/extensions/libxt_standard.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_standard.c
    21c21
    < void _init(void)
    ---
    > void libxt_standard_init(void)
    diff -r iptables/extensions/libxt_state.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_state.c
    134c134
    < void _init(void)
    ---
    > void libxt_state_init(void)
    diff -r iptables/extensions/libxt_statistic.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_statistic.c
    146c146
    < void _init(void)
    ---
    > void libxt_statistic_init(void)
    diff -r iptables/extensions/libxt_string.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_string.c
    339c339
    < void _init(void)
    ---
    > void libxt_string_init(void)
    diff -r iptables/extensions/libxt_tcp.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_tcp.c
    388c388
    < _init(void)
    ---
    > libxt_tcp_init(void)
    diff -r iptables/extensions/libxt_TCPMSS.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_TCPMSS.c
    122c122
    < void _init(void)
    ---
    > void libxt_TCPMSS_init(void)
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_tcpmss_.c
    Only in iptables/extensions: libxt_tcpmss.c
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_tcpmss_.man
    Only in iptables/extensions: libxt_tcpmss.man
    diff -r iptables/extensions/libxt_TEE.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_TEE.c
    123c123
    < void _init(void)
    ---
    > void libxt_TEE_init(void)
    diff -r iptables/extensions/libxt_time.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_time.c
    448c448
    < void _init(void)
    ---
    > void libxt_time_init(void)
    diff -r iptables/extensions/libxt_TOS.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_TOS.c
    217c217
    < void _init(void)
    ---
    > void libxt_TOS_init(void)
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_tos_.c
    Only in iptables/extensions: libxt_tos.c
    Only in psiphon-circumvention-system/Android/iptables/jni/extensions: libxt_tos_.man
    Only in iptables/extensions: libxt_tos.man
    diff -r iptables/extensions/libxt_TPROXY.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_TPROXY.c
    192c192
    < void _init(void)
    ---
    > void libxt_TPROXY_init(void)
    diff -r iptables/extensions/libxt_TRACE.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_TRACE.c
    18c18
    < void _init(void)
    ---
    > void libxt_TRACE_init(void)
    diff -r iptables/extensions/libxt_u32.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_u32.c
    280c280
    < void _init(void)
    ---
    > void libxt_u32_init(void)
    diff -r iptables/extensions/libxt_udp.c psiphon-circumvention-system/Android/iptables/jni/extensions/libxt_udp.c
    170c170
    < _init(void)
    ---
    > libxt_udp_init(void)
    Only in iptables/: .git
    Only in iptables/: .gitignore
    diff -r iptables/include/linux/netfilter/xt_CONNMARK.h psiphon-circumvention-system/Android/iptables/jni/include/linux/netfilter/xt_CONNMARK.h
    4c4
    < #include <linux/netfilter/xt_connmark.h>
    ---
    > #include <linux/netfilter/xt_connmark_.h>
    Only in psiphon-circumvention-system/Android/iptables/jni/include/linux/netfilter: xt_connmark_.h
    Only in iptables/include/linux/netfilter: xt_connmark.h
    diff -r iptables/include/linux/netfilter/xt_DSCP.h psiphon-circumvention-system/Android/iptables/jni/include/linux/netfilter/xt_DSCP.h
    13c13
    < #include <linux/netfilter/xt_dscp.h>
    ---
    > #include <linux/netfilter/xt_dscp_.h>
    Only in psiphon-circumvention-system/Android/iptables/jni/include/linux/netfilter: xt_dscp_.h
    Only in iptables/include/linux/netfilter: xt_dscp.h
    diff -r iptables/include/linux/netfilter/xt_MARK.h psiphon-circumvention-system/Android/iptables/jni/include/linux/netfilter/xt_MARK.h
    4c4
    < #include <linux/netfilter/xt_mark.h>
    ---
    > #include <linux/netfilter/xt_mark_.h>
    Only in psiphon-circumvention-system/Android/iptables/jni/include/linux/netfilter: xt_mark_.h
    Only in iptables/include/linux/netfilter: xt_mark.h
    Only in psiphon-circumvention-system/Android/iptables/jni/include/linux/netfilter: xt_rateest_.h
    Only in iptables/include/linux/netfilter: xt_rateest.h
    Only in psiphon-circumvention-system/Android/iptables/jni/include/linux/netfilter: xt_tcpmss_.h
    Only in iptables/include/linux/netfilter: xt_tcpmss.h
    Only in psiphon-circumvention-system/Android/iptables/jni/include/linux/netfilter_ipv4: ipt_ecn_.h
    Only in iptables/include/linux/netfilter_ipv4: ipt_ecn.h
    Only in psiphon-circumvention-system/Android/iptables/jni/include/linux/netfilter_ipv4: ipt_ttl_.h
    Only in iptables/include/linux/netfilter_ipv4: ipt_ttl.h
    Only in psiphon-circumvention-system/Android/iptables/jni/include/linux/netfilter_ipv6: ip6t_hl_.h
    Only in iptables/include/linux/netfilter_ipv6: ip6t_hl.h
    diff -r iptables/iptables/Android.mk psiphon-circumvention-system/Android/iptables/jni/iptables/Android.mk
    29d28
    < 
    55a55,110
    > # iptables-save
    > 
    > include $(CLEAR_VARS)
    > 
    > LOCAL_C_INCLUDES:= \
    >       $(LOCAL_PATH)/../include/
    > 
    > LOCAL_CFLAGS:=-DNO_SHARED_LIBS=1
    > LOCAL_CFLAGS+=-DALL_INCLUSIVE
    > LOCAL_CFLAGS+=-DXTABLES_INTERNAL
    > # Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__
    > LOCAL_CFLAGS+=-D__ANDROID__
    > 
    > LOCAL_SRC_FILES:= \
    >       iptables-save.c iptables.c xshared.c
    > 
    > LOCAL_MODULE_TAGS := optional
    > LOCAL_MODULE:=iptables-save
    > 
    > LOCAL_STATIC_LIBRARIES := \
    >       libext \
    >       libext4 \
    >       libip4tc \
    >       libxtables
    > 
    > include $(BUILD_EXECUTABLE)
    > 
    > #----------------------------------------------------------------
    > # iptables-restore
    > 
    > include $(CLEAR_VARS)
    > 
    > LOCAL_C_INCLUDES:= \
    >       $(LOCAL_PATH)/../include/
    > 
    > LOCAL_CFLAGS:=-DNO_SHARED_LIBS=1
    > LOCAL_CFLAGS+=-DALL_INCLUSIVE
    > LOCAL_CFLAGS+=-DXTABLES_INTERNAL
    > # Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__
    > LOCAL_CFLAGS+=-D__ANDROID__
    > 
    > LOCAL_SRC_FILES:= \
    >       iptables-restore.c iptables.c xshared.c
    > 
    > LOCAL_MODULE_TAGS := optional
    > LOCAL_MODULE:=iptables-restore
    > 
    > LOCAL_STATIC_LIBRARIES := \
    >       libext \
    >       libext4 \
    >       libip4tc \
    >       libxtables
    > 
    > include $(BUILD_EXECUTABLE)
    > 
    > #----------------------------------------------------------------
    56a112
    > 
    72a129,184
    > 
    > LOCAL_STATIC_LIBRARIES := \
    >       libext \
    >       libext6 \
    >       libip6tc \
    >       libxtables
    > 
    > include $(BUILD_EXECUTABLE)
    > 
    > #----------------------------------------------------------------
    > # ip6tables-save
    > 
    > include $(CLEAR_VARS)
    > 
    > LOCAL_C_INCLUDES:= \
    >       $(LOCAL_PATH)/../include/
    > 
    > LOCAL_CFLAGS:=-DNO_SHARED_LIBS=1
    > LOCAL_CFLAGS+=-DALL_INCLUSIVE
    > LOCAL_CFLAGS+=-DXTABLES_INTERNAL
    > # Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__
    > LOCAL_CFLAGS+=-D__ANDROID__
    > 
    > LOCAL_SRC_FILES:= \
    >       ip6tables-save.c ip6tables.c xshared.c
    > 
    > LOCAL_MODULE_TAGS := optional
    > LOCAL_MODULE:=ip6tables-save
    > 
    > LOCAL_STATIC_LIBRARIES := \
    >       libext \
    >       libext6 \
    >       libip6tc \
    >       libxtables
    > 
    > include $(BUILD_EXECUTABLE)
    > 
    > #----------------------------------------------------------------
    > # ip6tables-restore
    > 
    > include $(CLEAR_VARS)
    > 
    > LOCAL_C_INCLUDES:= \
    >       $(LOCAL_PATH)/../include/
    > 
    > LOCAL_CFLAGS:=-DNO_SHARED_LIBS=1
    > LOCAL_CFLAGS+=-DALL_INCLUSIVE
    > LOCAL_CFLAGS+=-DXTABLES_INTERNAL
    > # Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__
    > LOCAL_CFLAGS+=-D__ANDROID__
    > 
    > LOCAL_SRC_FILES:= \
    >       ip6tables-restore.c ip6tables.c xshared.c
    > 
    > LOCAL_MODULE_TAGS := optional
    > LOCAL_MODULE:=ip6tables-restore
    
  2. A Kruger reporter

    The changes shown above were made for the following reasons:

    • ndk-build does not seem to create LOCAL_GENERATED_SOURCES in the same way as when building the android system. So the generation of initext files and renaming of _init functions (via filter_init) was performed once and committed

    • We wanted to be able to build on Windows, where file names are not case-sensitive. Since the original sources contains files like libipt_ECN.c and libipt_ecn.c, the all-lower-case file names were all given a trailing underscore.

    • We wanted to try using iptables-save and iptables-restore. So rules for building those were added to the Android makefile.

  3. Log in to comment