123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- From: Matthias Schiffer <mschiffer@universe-factory.net>
- Date: Sat, 11 Jan 2014 11:47:31 +0100
- Subject: Update netifd from Barrier Breaker
- diff --git a/package/netifd/Makefile b/package/netifd/Makefile
- index 5f2ee03..6f6f30e 100644
- --- a/package/netifd/Makefile
- +++ b/package/netifd/Makefile
- @@ -1,13 +1,13 @@
- include $(TOPDIR)/rules.mk
-
- PKG_NAME:=netifd
- -PKG_VERSION:=2013-07-16
- +PKG_VERSION:=2013-12-29
- PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
- PKG_SOURCE_PROTO:=git
- PKG_SOURCE_URL:=git://nbd.name/luci2/netifd.git
- PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
- -PKG_SOURCE_VERSION:=2674941b06c1ec67f1aff1bff9212e1372106641
- +PKG_SOURCE_VERSION:=7d79d0a8aa5a5b4c1ed987af119356438d98fe7b
- PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
- PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
- # PKG_MIRROR_MD5SUM:=
- @@ -40,7 +40,7 @@ define Package/netifd/install
- $(INSTALL_DIR) $(1)/sbin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/netifd $(1)/sbin/
- $(CP) ./files/* $(1)/
- - $(CP) $(PKG_BUILD_DIR)/dummy/netifd-proto.sh $(1)/lib/netifd/
- + $(CP) $(PKG_BUILD_DIR)/scripts/* $(1)/lib/netifd/
- endef
-
- $(eval $(call BuildPackage,netifd))
- diff --git a/package/netifd/files/etc/hotplug.d/iface/00-netstate b/package/netifd/files/etc/hotplug.d/iface/00-netstate
- index c50cda6..023025c 100644
- --- a/package/netifd/files/etc/hotplug.d/iface/00-netstate
- +++ b/package/netifd/files/etc/hotplug.d/iface/00-netstate
- @@ -1,6 +1,5 @@
- [ ifup = "$ACTION" ] && {
- uci_toggle_state network "$INTERFACE" up 1
- - uci_toggle_state network "$INTERFACE" connect_time $(sed -ne 's![^0-9].*$!!p' /proc/uptime)
- [ -n "$DEVICE" ] && {
- uci_toggle_state network "$INTERFACE" device "$(uci -q get network.$INTERFACE.ifname)"
- uci_toggle_state network "$INTERFACE" ifname "$DEVICE"
- diff --git a/package/netifd/files/lib/netifd/dhcp.script b/package/netifd/files/lib/netifd/dhcp.script
- index 50163da..77b77f5 100755
- --- a/package/netifd/files/lib/netifd/dhcp.script
- +++ b/package/netifd/files/lib/netifd/dhcp.script
- @@ -44,19 +44,18 @@ setup_interface () {
- ip6rd="${ip6rd#* }"
- local ip6rdbr="${ip6rd%% *}"
-
- -uci -q batch <<-EOF >/dev/null
- -set network.$IFACE6RD.proto=6rd
- -set network.$IFACE6RD.auto=0
- -set network.$IFACE6RD.peeraddr=$ip6rdbr
- -set network.$IFACE6RD.ip4prefixlen=$v4mask
- -set network.$IFACE6RD.ip6prefix=$ip6rdprefix
- -set network.$IFACE6RD.ip6prefixlen=$ip6rdprefixlen
- -commit network
- -EOF
- + json_init
- + json_add_string name "$IFACE6RD"
- + json_add_string ifname "@$INTERFACE"
- + json_add_string proto "6rd"
- + json_add_string peeraddr "$ip6rdbr"
- + json_add_int ip4prefixlen "$v4mask"
- + json_add_string ip6prefix "$ip6rdprefix"
- + json_add_int ip6prefixlen "$ip6rdprefixlen"
- + json_add_string tunlink "$INTERFACE"
- + json_close_object
-
- - ifdown "$IFACE6RD"
- - /etc/init.d/network reload
- - ifup "$IFACE6RD"
- + ubus call network add_dynamic "$(json_dump)"
- fi
-
- # TODO
- diff --git a/package/netifd/files/lib/netifd/proto/dhcp.sh b/package/netifd/files/lib/netifd/proto/dhcp.sh
- index a270c68..0117b27 100755
- --- a/package/netifd/files/lib/netifd/proto/dhcp.sh
- +++ b/package/netifd/files/lib/netifd/proto/dhcp.sh
- @@ -13,20 +13,25 @@ proto_dhcp_init_config() {
- proto_config_add_boolean "broadcast"
- proto_config_add_string "reqopts"
- proto_config_add_string "iface6rd"
- + proto_config_add_string "sendopts"
- }
-
- proto_dhcp_setup() {
- local config="$1"
- local iface="$2"
-
- - local ipaddr hostname clientid vendorid broadcast reqopts iface6rd
- - json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd
- + local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts
- + json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts
-
- local opt dhcpopts
- for opt in $reqopts; do
- append dhcpopts "-O $opt"
- done
-
- + for opt in $sendopts; do
- + append dhcpopts "-x $opt"
- + done
- +
- [ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
- [ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C"
- [ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
- diff --git a/package/netifd/patches/001-musl_af_inet_include.patch b/package/netifd/patches/001-musl_af_inet_include.patch
- new file mode 100644
- index 0000000..510ee05
- --- /dev/null
- +++ b/package/netifd/patches/001-musl_af_inet_include.patch
- @@ -0,0 +1,11 @@
- +diff -urN netifd-2012-10-29/utils.c netifd-2012-10-29.new/utils.c
- +--- netifd-2012-10-29/utils.c 2012-11-23 17:15:39.000000000 +0100
- ++++ netifd-2012-10-29.new/utils.c 2012-11-23 17:16:53.409244361 +0100
- +@@ -17,6 +17,7 @@
- +
- + #include <arpa/inet.h>
- + #include <netinet/in.h>
- ++#include <sys/socket.h>
- +
- + void
- + __vlist_simple_init(struct vlist_simple_tree *tree, int offset)
|