ucode: enable rtnl plugin

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2022-02-04 12:46:30 +01:00
parent d5fed93ec0
commit c1903ae2f9
2 changed files with 33 additions and 3 deletions

View File

@@ -132,6 +132,17 @@ define Package/ucode-mod-struct/description
endef
define Package/ucode-mod-rtnl
$(Package/ucode/default)
TITLE+= (rtnl module)
DEPENDS:=ucode +libnl-tiny
endef
define Package/ucode-mod-struct/description
The rtnl module allows templates to send and receive rtnl messages..
endef
define Build/Prepare
$(Build/Prepare/Default)
$(CP) $(STAGING_DIR)/usr/include/mac80211/uapi/linux/nl80211.h $(PKG_BUILD_DIR)/nl80211_copy.h
@@ -189,6 +200,11 @@ define Package/ucode-mod-struct/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/struct.so $(1)/usr/lib/ucode/
endef
define Package/ucode-mod-rtnl/install
$(INSTALL_DIR) $(1)/usr/lib/ucode
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/rtnl.so $(1)/usr/lib/ucode/
endef
$(eval $(call BuildPackage,ucode))
$(eval $(call BuildPackage,libucode))
@@ -199,3 +215,4 @@ $(eval $(call BuildPackage,ucode-mod-ubus))
$(eval $(call BuildPackage,ucode-mod-uci))
$(eval $(call BuildPackage,ucode-mod-nl80211))
$(eval $(call BuildPackage,ucode-mod-struct))
$(eval $(call BuildPackage,ucode-mod-rtnl))

View File

@@ -1,11 +1,12 @@
From aaf6b8d2355044843a7f0e765fb295518d5c114b Mon Sep 17 00:00:00 2001
From 1c89014c7c0e68e1eeb851ea538fb67a57988dd4 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Thu, 20 Jan 2022 10:48:35 +0100
Subject: [PATCH] fixes
Subject: [PATCH 1/2] fixes
---
lib/nl80211.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 68 insertions(+), 5 deletions(-)
lib/rtnl.c | 1 +
2 files changed, 69 insertions(+), 5 deletions(-)
diff --git a/lib/nl80211.c b/lib/nl80211.c
index fc24fb8..e308ebc 100644
@@ -161,6 +162,18 @@ index fc24fb8..e308ebc 100644
v = ucv_object_get(obj, attrs[i].key, &exists);
if (!exists)
diff --git a/lib/rtnl.c b/lib/rtnl.c
index b6a3e38..c1d2088 100644
--- a/lib/rtnl.c
+++ b/lib/rtnl.c
@@ -682,6 +682,7 @@ static const uc_nl_nested_spec_t link_msg = {
{ IFLA_UNSPEC, "type", DT_U16, 0, MEMBER(ifinfomsg, ifi_type) },
{ IFLA_UNSPEC, "dev", DT_NETDEV, 0, MEMBER(ifinfomsg, ifi_index) },
{ IFLA_UNSPEC, "flags", DT_FLAGS, 0, MEMBER(ifinfomsg, ifi_flags) },
+ { IFLA_UNSPEC, "change", DT_FLAGS, 0, MEMBER(ifinfomsg, ifi_change) },
{ IFLA_ADDRESS, "address", DT_LLADDR, 0, NULL },
{ IFLA_BROADCAST, "broadcast", DT_LLADDR, 0, NULL },
{ IFLA_TXQLEN, "txqlen", DT_U32, 0, NULL },
--
2.25.1