0016-netifd-update-to-latest-version.patch 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Fri, 29 Jul 2016 21:28:24 +0200
  3. Subject: netifd: update to latest version
  4. diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
  5. index 619024b..dc83ca6 100644
  6. --- a/package/network/config/netifd/Makefile
  7. +++ b/package/network/config/netifd/Makefile
  8. @@ -1,15 +1,15 @@
  9. include $(TOPDIR)/rules.mk
  10. PKG_NAME:=netifd
  11. -PKG_VERSION:=2015-12-16
  12. +PKG_VERSION:=2016-07-29
  13. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_URL:=http://git.openwrt.org/project/netifd.git
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. -PKG_SOURCE_VERSION:=245527193e90906451be35c2b8e972b8712ea6ab
  18. +PKG_SOURCE_VERSION:=656c387974879105c2aaec6b62478d0195067f2d
  19. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  20. -PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
  21. +PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  22. # PKG_MIRROR_MD5SUM:=
  23. # CMAKE_INSTALL:=1
  24. diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network
  25. index 542fc08..bdadbbc 100755
  26. --- a/package/network/config/netifd/files/etc/init.d/network
  27. +++ b/package/network/config/netifd/files/etc/init.d/network
  28. @@ -21,7 +21,6 @@ start_service() {
  29. procd_set_param watch network.interface
  30. [ -e /proc/sys/kernel/core_pattern ] && {
  31. procd_set_param limits core="unlimited"
  32. - echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
  33. }
  34. procd_close_instance
  35. }
  36. diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
  37. index 0e88af9..1d3a209 100755
  38. --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
  39. +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh
  40. @@ -12,6 +12,7 @@ proto_dhcp_init_config() {
  41. proto_config_add_string clientid
  42. proto_config_add_string vendorid
  43. proto_config_add_boolean 'broadcast:bool'
  44. + proto_config_add_boolean 'release:bool'
  45. proto_config_add_string 'reqopts:list(string)'
  46. proto_config_add_string iface6rd
  47. proto_config_add_string sendopts
  48. @@ -26,8 +27,8 @@ proto_dhcp_setup() {
  49. local config="$1"
  50. local iface="$2"
  51. - local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes
  52. - json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes
  53. + local ipaddr hostname clientid vendorid broadcast release reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes
  54. + json_get_vars ipaddr hostname clientid vendorid broadcast release reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes
  55. local opt dhcpopts
  56. for opt in $reqopts; do
  57. @@ -39,6 +40,7 @@ proto_dhcp_setup() {
  58. done
  59. [ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
  60. + [ "$release" = 1 ] && release="-R" || release=
  61. [ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C"
  62. [ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
  63. [ "$iface6rd" != 0 -a -f /lib/netifd/proto/6rd.sh ] && append dhcpopts "-O 212"
  64. @@ -54,9 +56,9 @@ proto_dhcp_setup() {
  65. -s /lib/netifd/dhcp.script \
  66. -f -t 0 -i "$iface" \
  67. ${ipaddr:+-r $ipaddr} \
  68. - ${hostname:+-H $hostname} \
  69. - ${vendorid:+-V $vendorid} \
  70. - $clientid $broadcast $dhcpopts
  71. + ${hostname:+-x "hostname:$hostname"} \
  72. + ${vendorid:+-V "$vendorid"} \
  73. + $clientid $broadcast $release $dhcpopts
  74. }
  75. proto_dhcp_renew() {
  76. diff --git a/package/network/config/netifd/files/sbin/ifup b/package/network/config/netifd/files/sbin/ifup
  77. index af3aaa8..5515b91 100755
  78. --- a/package/network/config/netifd/files/sbin/ifup
  79. +++ b/package/network/config/netifd/files/sbin/ifup
  80. @@ -67,12 +67,10 @@ if [ -n "$setup_wifi" ] && grep -sq config /etc/config/wireless; then
  81. fi
  82. }
  83. - local radio_devs
  84. - local network="$1"
  85. + network="$1"
  86. config_load wireless
  87. config_foreach find_related_radios wifi-iface
  88. - local dev
  89. for dev in $(echo "$radio_devs" | sort -u); do
  90. /sbin/wifi up "$dev"
  91. done