mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
qosify: update to latest bpf-headers ABI
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -16,7 +16,7 @@ PKG_BUILD_DEPENDS:=bpf-headers
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
#include $(INCLUDE_DIR)/bpf.mk
|
||||
include $(INCLUDE_DIR)/bpf.mk
|
||||
|
||||
define Package/qosify
|
||||
SECTION:=kernel
|
||||
@@ -27,12 +27,10 @@ define Package/qosify
|
||||
PKGFLAGS+=nonshared
|
||||
endef
|
||||
|
||||
#BPF_DOC = $(wildcard $(patsubst %,$(BPF_HEADERS_DIR)/scripts/%.py,bpf_doc bpf_helpers_doc))
|
||||
|
||||
TARGET_CFLAGS += -I$(BPF_HEADERS_DIR)/user_headers/include
|
||||
BPF_DOC = $(wildcard $(patsubst %,$(BPF_HEADERS_DIR)/scripts/%.py,bpf_doc bpf_helpers_doc))
|
||||
|
||||
define Build/Compile
|
||||
# $(call CompileBPF,$(PKG_BUILD_DIR)/qosify-bpf.c)
|
||||
$(call CompileBPF,$(PKG_BUILD_DIR)/qosify-bpf.c)
|
||||
$(Build/Compile/Default)
|
||||
endef
|
||||
|
||||
@@ -43,7 +41,7 @@ endef
|
||||
|
||||
define Package/qosify/install
|
||||
$(INSTALL_DIR) $(1)/lib/bpf $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/net
|
||||
$(INSTALL_DATA) ./files/qosify-bpf.o $(1)/lib/bpf
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/qosify-bpf.o $(1)/lib/bpf
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qosify $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) ./files/qosify.init $(1)/etc/init.d/qosify
|
||||
$(INSTALL_DATA) ./files/qosify-defaults.conf $(1)/etc/qosify-defaults.conf
|
||||
|
||||
Binary file not shown.
@@ -20,7 +20,7 @@ add_defaults() {
|
||||
|
||||
json_add_boolean reset 1
|
||||
|
||||
config_get files "$cfg" files
|
||||
config_get files "$cfg" defaults
|
||||
json_add_array files
|
||||
for i in $files; do
|
||||
json_add_string "" "$i"
|
||||
|
||||
@@ -62,6 +62,7 @@ int main(int argc, char **argv)
|
||||
|
||||
uloop_run();
|
||||
|
||||
qosify_ubus_stop();
|
||||
qosify_iface_stop();
|
||||
|
||||
uloop_done();
|
||||
|
||||
@@ -238,7 +238,9 @@ parse_l4proto(struct qosify_config *config, struct __sk_buff *skb,
|
||||
return;
|
||||
|
||||
if ((*value & DSCP_FALLBACK_FLAG) && *dscp_out)
|
||||
*dscp_out = *value;
|
||||
return;
|
||||
|
||||
*dscp_out = *value;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -38,7 +38,7 @@ struct qosify_map_data {
|
||||
uint8_t file_dscp;
|
||||
|
||||
union {
|
||||
uint16_t port;
|
||||
uint32_t port;
|
||||
struct in_addr ip;
|
||||
struct in6_addr ip6;
|
||||
} addr;
|
||||
@@ -77,6 +77,7 @@ void qosify_iface_status(struct blob_buf *b);
|
||||
void qosify_iface_stop(void);
|
||||
|
||||
int qosify_ubus_init(void);
|
||||
void qosify_ubus_stop(void);
|
||||
int qosify_ubus_check_interface(const char *name, char *ifname, int ifname_len);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -139,8 +139,8 @@ static const struct blobmsg_policy qosify_config_policy[__CL_CONFIG_MAX] = {
|
||||
[CL_CONFIG_RESET] = { "reset", BLOBMSG_TYPE_BOOL },
|
||||
[CL_CONFIG_FILES] = { "files", BLOBMSG_TYPE_ARRAY },
|
||||
[CL_CONFIG_TIMEOUT] = { "timeout", BLOBMSG_TYPE_INT32 },
|
||||
[CL_CONFIG_DSCP_UDP] = { "dscp_default_tcp", BLOBMSG_TYPE_STRING },
|
||||
[CL_CONFIG_DSCP_TCP] = { "dscp_default_udp", BLOBMSG_TYPE_STRING },
|
||||
[CL_CONFIG_DSCP_UDP] = { "dscp_default_udp", BLOBMSG_TYPE_STRING },
|
||||
[CL_CONFIG_DSCP_TCP] = { "dscp_default_tcp", BLOBMSG_TYPE_STRING },
|
||||
[CL_CONFIG_DSCP_PRIO] = { "dscp_prio", BLOBMSG_TYPE_STRING },
|
||||
[CL_CONFIG_DSCP_BULK] = { "dscp_bulk", BLOBMSG_TYPE_STRING },
|
||||
[CL_CONFIG_DSCP_ICMP] = { "dscp_icmp", BLOBMSG_TYPE_STRING },
|
||||
@@ -308,6 +308,11 @@ int qosify_ubus_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void qosify_ubus_stop(void)
|
||||
{
|
||||
ubus_auto_shutdown(&conn);
|
||||
}
|
||||
|
||||
struct iface_req {
|
||||
char *name;
|
||||
int len;
|
||||
|
||||
Reference in New Issue
Block a user