[OpenWrt-Devel] [PATCH] iproute2: bump version to v3.18.0, add package for bridge program

Jonathan Thibault jonathan at navigue.com
Mon Jan 5 09:33:06 EST 2015


It'd probably be nice to add vlan filtering support to the bridge utility.

I submitted a patch to do so earlier

https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/030024.html

On 30/12/14 11:17 PM, Russell Senior wrote:
> Signed-off-by: Russell Senior <russell at personaltelco.net>
>
> ---
>  package/network/utils/iproute2/Makefile                  | 15 +++++++++++++--
>  package/network/utils/iproute2/patches/300-ip_tiny.patch | 15 ++++++++-------
>  2 files changed, 21 insertions(+), 9 deletions(-)
>
> diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
> index 9aea05e..13b240e 100644
> --- a/package/network/utils/iproute2/Makefile
> +++ b/package/network/utils/iproute2/Makefile
> @@ -8,12 +8,12 @@
>  include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=iproute2
> -PKG_VERSION:=3.17.0
> +PKG_VERSION:=3.18.0
>  PKG_RELEASE:=1
>  
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
>  PKG_SOURCE_URL:=http://kernel.org/pub/linux/utils/net/iproute2/
> -PKG_MD5SUM:=b741a02c6dda5818d18011d572874493
> +PKG_MD5SUM:=6f6ad51a00007880460e103367b16057
>  PKG_BUILD_PARALLEL:=1
>  PKG_LICENSE:=GPL-2.0
>  
> @@ -63,6 +63,11 @@ $(call Package/iproute2/Default)
>    TITLE:=Socket statistics utility
>  endef
>  
> +define Package/ip-bridge
> +$(call Package/iproute2/Default)
> +  TITLE:=Bridge utility from iproute2
> +endef
> +
>  ifeq ($(BUILD_VARIANT),tiny)
>    IP_CONFIG_TINY:=y
>  endif
> @@ -135,8 +140,14 @@ define Package/ss/install
>  	$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/
>  endef
>  
> +define Package/ip-bridge/install
> +	$(INSTALL_DIR) $(1)/usr/sbin
> +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/
> +endef
> +
>  $(eval $(call BuildPackage,ip))
>  $(eval $(call BuildPackage,ip-full))
>  $(eval $(call BuildPackage,tc))
>  $(eval $(call BuildPackage,genl))
>  $(eval $(call BuildPackage,ss))
> +$(eval $(call BuildPackage,ip-bridge))
> diff --git a/package/network/utils/iproute2/patches/300-ip_tiny.patch b/package/network/utils/iproute2/patches/300-ip_tiny.patch
> index 5b0d56c..3620120 100644
> --- a/package/network/utils/iproute2/patches/300-ip_tiny.patch
> +++ b/package/network/utils/iproute2/patches/300-ip_tiny.patch
> @@ -1,6 +1,6 @@
>  --- a/ip/Makefile
>  +++ b/ip/Makefile
> -@@ -15,6 +15,13 @@ ifeq ($(IP_CONFIG_SETNS),y)
> +@@ -16,6 +16,13 @@ ifeq ($(IP_CONFIG_SETNS),y)
>   	CFLAGS += -DHAVE_SETNS
>   endif
>   
> @@ -14,7 +14,7 @@
>   ALLOBJ=$(IPOBJ) $(RTMONOBJ)
>   SCRIPTS=ifcfg rtpr routel routef
>   TARGETS=ip rtmon
> -@@ -42,7 +49,7 @@ else
> +@@ -43,7 +50,7 @@ else
>   
>   ip: static-syms.o
>   static-syms.o: static-syms.h
> @@ -25,7 +25,7 @@
>   		sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
>  --- a/ip/ip.c
>  +++ b/ip/ip.c
> -@@ -66,29 +66,41 @@ static const struct cmd {
> +@@ -69,30 +69,42 @@ static const struct cmd {
>   	int (*func)(int argc, char **argv);
>   } cmds[] = {
>   	{ "address",	do_ipaddr },
> @@ -44,6 +44,7 @@
>   	{ "link",	do_iplink },
>  +#ifndef IPROUTE2_TINY
>   	{ "l2tp",	do_ipl2tp },
> +	{ "fou",	do_ipfou },
>  +#endif
>   	{ "tunnel",	do_iptunnel },
>   	{ "tunl",	do_iptunnel },
> @@ -69,7 +70,7 @@
>   };
>  --- a/lib/utils.c
>  +++ b/lib/utils.c
> -@@ -627,6 +627,7 @@ const char *rt_addr_n2a(int af, int len,
> +@@ -629,6 +629,7 @@ const char *rt_addr_n2a(int af, const vo
>   	case AF_INET:
>   	case AF_INET6:
>   		return inet_ntop(af, addr, buf, buflen);
> @@ -77,7 +78,7 @@
>   	case AF_IPX:
>   		return ipx_ntop(af, addr, buf, buflen);
>   	case AF_DECnet:
> -@@ -635,6 +636,7 @@ const char *rt_addr_n2a(int af, int len,
> +@@ -637,6 +638,7 @@ const char *rt_addr_n2a(int af, const vo
>   		memcpy(dna.a_addr, addr, 2);
>   		return dnet_ntop(af, &dna, buf, buflen);
>   	}
> @@ -85,7 +86,7 @@
>   	default:
>   		return "???";
>   	}
> -@@ -710,6 +712,7 @@ const char *format_host(int af, int len,
> +@@ -712,6 +714,7 @@ const char *format_host(int af, int len,
>   			case AF_INET6:
>   				len = 16;
>   				break;
> @@ -93,7 +94,7 @@
>   			case AF_IPX:
>   				len = 10;
>   				break;
> -@@ -720,6 +723,7 @@ const char *format_host(int af, int len,
> +@@ -722,6 +725,7 @@ const char *format_host(int af, int len,
>   				len = 2;
>   				break;
>   #endif
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list