Changeset 30676


Ignore:
Timestamp:
2012-02-22T02:47:48+01:00 (5 years ago)
Author:
nbd
Message:

iptables: make it possible to dynamically configure built-in statically linked extensions, fold -mod-conntrack and -mod-nat into the default package. saves about 8k on an ar71xx default squashfs

Location:
trunk/package
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/firewall/Makefile

    r30363 r30676  
    2020  TITLE:=OpenWrt firewall 
    2121  MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org> 
    22   DEPENDS:=+iptables +iptables-mod-conntrack +iptables-mod-nat 
     22  DEPENDS:=+iptables +kmod-ipt-conntrack +kmod-ipt-nat 
    2323  PKGARCH:=all 
    2424endef 
  • trunk/package/iptables/Makefile

    r30675 r30676  
    7777  - filter 
    7878  - mangle 
    79  
    80 endef 
    81  
    82 define Package/iptables-mod-conntrack 
    83 $(call Package/iptables/Module, +kmod-ipt-conntrack) 
    84   TITLE:=Basic connection tracking extensions 
    85 endef 
    86  
    87 define Package/iptables-mod-conntrack/description 
    88 Basic iptables extensions for connection tracking. 
    89  
    90  Matches: 
    91   - state 
    92   - conntrack 
    93  
    94  Targets: 
    95   - NOTRACK 
    96  
    97  Tables: 
    98   - raw 
    9979 
    10080endef 
     
    193173endef 
    194174 
    195 define Package/iptables-mod-nat 
    196 $(call Package/iptables/Module, +kmod-ipt-nat) 
    197   TITLE:=Basic NAT extensions 
    198 endef 
    199  
    200 define Package/iptables-mod-nat/description 
    201 iptables extensions for basic NAT targets. 
    202  
    203  Targets: 
    204   - SNAT 
    205   - DNAT 
    206   - MASQUERADE 
    207  
    208  Tables: 
    209   - nat 
    210  
    211 endef 
    212  
    213175define Package/iptables-mod-nat-extra 
    214176$(call Package/iptables/Module, +kmod-ipt-nat-extra) 
     
    395357        --enable-libipq \ 
    396358        --with-kernel="$(LINUX_DIR)" \ 
    397         --with-xtlibdir=/usr/lib/iptables 
     359        --with-xtlibdir=/usr/lib/iptables \ 
     360        --enable-static 
    398361 
    399362MAKE_FLAGS := \ 
     
    402365        KERNEL_DIR="$(LINUX_DIR)" PREFIX=/usr \ 
    403366        KBUILD_OUTPUT="$(LINUX_DIR)" \ 
     367        BUILTIN_MODULES="$(patsubst ipt_%,%,$(patsubst xt_%,%,$(IPT_BUILTIN) $(IPT_CONNTRACK-m) $(IPT_NAT-m)))" 
    404368 
    405369define Build/InstallDev 
     
    432396        $(LN) iptables $(1)/usr/sbin/iptables-restore 
    433397        $(INSTALL_DIR) $(1)/usr/lib/iptables 
    434         (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \ 
    435                 for m in $(patsubst xt_%,ipt_%,$(IPT_BUILTIN)) $(patsubst ipt_%,xt_%,$(IPT_BUILTIN)); do \ 
    436                         if [ -f $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$${m}.so ]; then \ 
    437                                 $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$${m}.so $(1)/usr/lib/iptables/ ;\ 
    438                         fi; \ 
    439                 done \ 
    440         ) 
    441398endef 
    442399 
     
    497454 
    498455$(eval $(call BuildPackage,iptables)) 
    499 $(eval $(call BuildPlugin,iptables-mod-conntrack,$(IPT_CONNTRACK-m))) 
    500456$(eval $(call BuildPlugin,iptables-mod-conntrack-extra,$(IPT_CONNTRACK_EXTRA-m))) 
    501457$(eval $(call BuildPlugin,iptables-mod-extra,$(IPT_EXTRA-m))) 
     
    504460$(eval $(call BuildPlugin,iptables-mod-ipsec,$(IPT_IPSEC-m))) 
    505461$(eval $(call BuildPlugin,iptables-mod-ipset,ipt_set ipt_SET)) 
    506 $(eval $(call BuildPlugin,iptables-mod-nat,$(IPT_NAT-m))) 
    507462$(eval $(call BuildPlugin,iptables-mod-nat-extra,$(IPT_NAT_EXTRA-m))) 
    508463$(eval $(call BuildPlugin,iptables-mod-iprange,$(IPT_IPRANGE-m))) 
Note: See TracChangeset for help on using the changeset viewer.