0017-netifd-update-to-latest-git-master.patch 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Wed, 9 Mar 2016 06:46:44 +0100
  3. Subject: netifd: update to latest git master
  4. diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
  5. index 619024b..84a4592 100644
  6. --- a/package/network/config/netifd/Makefile
  7. +++ b/package/network/config/netifd/Makefile
  8. @@ -1,13 +1,13 @@
  9. include $(TOPDIR)/rules.mk
  10. PKG_NAME:=netifd
  11. -PKG_VERSION:=2015-12-16
  12. +PKG_VERSION:=2016-03-31
  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_URL=$(OPENWRT_GIT)/project/netifd.git
  17. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  18. -PKG_SOURCE_VERSION:=245527193e90906451be35c2b8e972b8712ea6ab
  19. +PKG_SOURCE_VERSION:=6fd6be6b7f3fc4883fdc464fcbcb2b5e8d8e8174
  20. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  21. PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
  22. # PKG_MIRROR_MD5SUM:=
  23. diff --git a/package/network/config/netifd/files/etc/init.d/network b/package/network/config/netifd/files/etc/init.d/network
  24. index 542fc08..bdadbbc 100755
  25. --- a/package/network/config/netifd/files/etc/init.d/network
  26. +++ b/package/network/config/netifd/files/etc/init.d/network
  27. @@ -21,7 +21,6 @@ start_service() {
  28. procd_set_param watch network.interface
  29. [ -e /proc/sys/kernel/core_pattern ] && {
  30. procd_set_param limits core="unlimited"
  31. - echo '/tmp/%e.%p.%s.%t.core' > /proc/sys/kernel/core_pattern
  32. }
  33. procd_close_instance
  34. }
  35. diff --git a/package/network/config/netifd/files/sbin/ifup b/package/network/config/netifd/files/sbin/ifup
  36. index af3aaa8..5515b91 100755
  37. --- a/package/network/config/netifd/files/sbin/ifup
  38. +++ b/package/network/config/netifd/files/sbin/ifup
  39. @@ -67,12 +67,10 @@ if [ -n "$setup_wifi" ] && grep -sq config /etc/config/wireless; then
  40. fi
  41. }
  42. - local radio_devs
  43. - local network="$1"
  44. + network="$1"
  45. config_load wireless
  46. config_foreach find_related_radios wifi-iface
  47. - local dev
  48. for dev in $(echo "$radio_devs" | sort -u); do
  49. /sbin/wifi up "$dev"
  50. done
  51. diff --git a/package/network/config/netifd/patches/0001-Revert-device-Don-t-process-link-events-anymore-in-d.patch b/package/network/config/netifd/patches/0001-Revert-device-Don-t-process-link-events-anymore-in-d.patch
  52. new file mode 100644
  53. index 0000000..312964f
  54. --- /dev/null
  55. +++ b/package/network/config/netifd/patches/0001-Revert-device-Don-t-process-link-events-anymore-in-d.patch
  56. @@ -0,0 +1,121 @@
  57. +From e0f19fdae88f3ef505e22533915f8328f4793980 Mon Sep 17 00:00:00 2001
  58. +Message-Id: <e0f19fdae88f3ef505e22533915f8328f4793980.1462479663.git.mschiffer@universe-factory.net>
  59. +From: Matthias Schiffer <mschiffer@universe-factory.net>
  60. +Date: Thu, 5 May 2016 21:49:33 +0200
  61. +Subject: [PATCH] Revert "device: Don't process link events anymore in device
  62. + user specific callback handlers"
  63. +
  64. +This reverts commit 4902ba2999dec02e82066d70ab6096b852a33007.
  65. +---
  66. + device.h | 2 ++
  67. + macvlan.c | 8 ++++++++
  68. + system-linux.c | 2 +-
  69. + vlan.c | 6 ++++++
  70. + vlandev.c | 8 ++++++++
  71. + 5 files changed, 25 insertions(+), 1 deletion(-)
  72. +
  73. +diff --git a/device.h b/device.h
  74. +index ac77cfb..ef1c608 100644
  75. +--- a/device.h
  76. ++++ b/device.h
  77. +@@ -59,6 +59,8 @@ struct device_type {
  78. + struct list_head list;
  79. + const char *name;
  80. +
  81. ++ bool keep_link_status;
  82. ++
  83. + const struct uci_blob_param_list *config_params;
  84. +
  85. + struct device *(*create)(const char *name, struct blob_attr *attr);
  86. +diff --git a/macvlan.c b/macvlan.c
  87. +index a0f11ae..051fe05 100644
  88. +--- a/macvlan.c
  89. ++++ b/macvlan.c
  90. +@@ -72,6 +72,12 @@ macvlan_base_cb(struct device_user *dev, enum device_event ev)
  91. + case DEV_EVENT_REMOVE:
  92. + device_set_present(&mvdev->dev, false);
  93. + break;
  94. ++ case DEV_EVENT_LINK_UP:
  95. ++ device_set_link(&mvdev->dev, true);
  96. ++ break;
  97. ++ case DEV_EVENT_LINK_DOWN:
  98. ++ device_set_link(&mvdev->dev, false);
  99. ++ break;
  100. + default:
  101. + return;
  102. + }
  103. +@@ -255,6 +261,8 @@ macvlan_create(const char *name, struct blob_attr *attr)
  104. + const struct device_type macvlan_device_type = {
  105. + .name = "MAC VLAN",
  106. + .config_params = &macvlan_attr_list,
  107. ++ .keep_link_status = true,
  108. ++
  109. + .create = macvlan_create,
  110. + .config_init = macvlan_config_init,
  111. + .reload = macvlan_reload,
  112. +diff --git a/system-linux.c b/system-linux.c
  113. +index 351a994..794c1dd 100644
  114. +--- a/system-linux.c
  115. ++++ b/system-linux.c
  116. +@@ -464,7 +464,7 @@ static int cb_rtnl_event(struct nl_msg *msg, void *arg)
  117. + goto out;
  118. +
  119. + struct device *dev = device_get(nla_data(nla[IFLA_IFNAME]), false);
  120. +- if (!dev)
  121. ++ if (!dev || dev->type->keep_link_status)
  122. + goto out;
  123. +
  124. + if (!system_get_dev_sysctl("/sys/class/net/%s/carrier", dev->ifname, buf, sizeof(buf)))
  125. +diff --git a/vlan.c b/vlan.c
  126. +index ac434ce..8d93799 100644
  127. +--- a/vlan.c
  128. ++++ b/vlan.c
  129. +@@ -79,6 +79,11 @@ static void vlan_dev_cb(struct device_user *dep, enum device_event ev)
  130. + case DEV_EVENT_REMOVE:
  131. + device_set_present(&vldev->dev, new_state);
  132. + break;
  133. ++ case DEV_EVENT_LINK_UP:
  134. ++ new_state = true;
  135. ++ case DEV_EVENT_LINK_DOWN:
  136. ++ device_set_link(&vldev->dev, new_state);
  137. ++ break;
  138. + case DEV_EVENT_UPDATE_IFNAME:
  139. + vlan_dev_set_name(vldev, dep->dev);
  140. + device_broadcast_event(&vldev->dev, ev);
  141. +@@ -97,6 +102,7 @@ static struct device *get_vlan_device(struct device *dev, int id, bool create)
  142. + static const struct device_type vlan_type = {
  143. + .name = "VLAN",
  144. + .config_params = &device_attr_list,
  145. ++ .keep_link_status = true,
  146. + .free = free_vlan_if,
  147. + };
  148. + struct vlan_device *vldev;
  149. +diff --git a/vlandev.c b/vlandev.c
  150. +index b93527c..884e6ef 100644
  151. +--- a/vlandev.c
  152. ++++ b/vlandev.c
  153. +@@ -63,6 +63,12 @@ vlandev_base_cb(struct device_user *dev, enum device_event ev)
  154. + case DEV_EVENT_REMOVE:
  155. + device_set_present(&mvdev->dev, false);
  156. + break;
  157. ++ case DEV_EVENT_LINK_UP:
  158. ++ device_set_link(&mvdev->dev, true);
  159. ++ break;
  160. ++ case DEV_EVENT_LINK_DOWN:
  161. ++ device_set_link(&mvdev->dev, false);
  162. ++ break;
  163. + default:
  164. + return;
  165. + }
  166. +@@ -243,6 +249,8 @@ vlandev_create(const char *name, struct blob_attr *attr)
  167. + const struct device_type vlandev_device_type = {
  168. + .name = "VLANDEV",
  169. + .config_params = &vlandev_attr_list,
  170. ++ .keep_link_status = true,
  171. ++
  172. + .create = vlandev_create,
  173. + .config_init = vlandev_config_init,
  174. + .reload = vlandev_reload,
  175. +--
  176. +2.8.2
  177. +