nss-packages-LiBwrt/qca-nss-clients/patches/0030-nss-clients-add-kernel-6.12-support.patch

138 lines
5.5 KiB
Diff

--- a/bridge/nss_bridge_mgr.c
+++ b/bridge/nss_bridge_mgr.c
@@ -1486,7 +1486,7 @@ static struct notifier_block nss_bridge_
* nss_bridge_mgr_wan_inf_add_handler
* Marks an interface as a WAN interface for special handling by bridge.
*/
-static int nss_bridge_mgr_wan_intf_add_handler(struct ctl_table *table,
+static int nss_bridge_mgr_wan_intf_add_handler(const struct ctl_table *table,
int write, void __user *buffer,
size_t *lenp, loff_t *ppos)
{
@@ -1535,7 +1535,7 @@ static int nss_bridge_mgr_wan_intf_add_h
* nss_bridge_mgr_wan_inf_del_handler
* Un-marks an interface as a WAN interface.
*/
-static int nss_bridge_mgr_wan_intf_del_handler(struct ctl_table *table,
+static int nss_bridge_mgr_wan_intf_del_handler(const struct ctl_table *table,
int write, void __user *buffer,
size_t *lenp, loff_t *ppos)
{
--- a/l2tp/l2tpv2/nss_connmgr_l2tpv2.c
+++ b/l2tp/l2tpv2/nss_connmgr_l2tpv2.c
@@ -319,7 +319,7 @@ static struct nss_connmgr_l2tpv2_session
*/
dev_hold(dev);
l2tpv2_session_data->dev = dev;
- strlcpy(session->ifname, dev->name, IFNAMSIZ);
+ strscpy(session->ifname, dev->name, IFNAMSIZ);
/*
* There is no need for protecting simultaneous addition &
@@ -417,7 +417,7 @@ static void nss_connmgr_l2tpv2_exception
/*
* set skb_iif
*/
- rt = ip_route_output(&init_net, iph_inner->saddr, 0, 0, 0);
+ rt = ip_route_output(&init_net, iph_inner->saddr, 0, 0, 0, 0);
if (unlikely(IS_ERR(rt))) {
nss_connmgr_l2tpv2_warning("Martian packets !!!");
} else {
--- a/l2tp/l2tpv2/nss_l2tpv2_stats.c
+++ b/l2tp/l2tpv2/nss_l2tpv2_stats.c
@@ -129,7 +129,7 @@ void nss_l2tpv2_update_dev_stats(struct
dev_put(dev);
return;
}
- session = l2tp_tunnel_get_session(tunnel, data.l2tpv2.session.session_id);
+ session = l2tp_v2_session_get(dev_net(dev), data.l2tpv2.tunnel.tunnel_id, data.l2tpv2.session.session_id);
if (!session) {
tunnel_put(tunnel);
dev_put(dev);
--- a/nss_qdisc/nss_bf.c
+++ b/nss_qdisc/nss_bf.c
@@ -381,7 +381,7 @@ static int nss_bf_graft_class(struct Qdi
*/
nss_qdisc_info("Grafting old: %px with new: %px\n", *old, new);
if (*old != &noop_qdisc) {
- struct nss_qdisc *nq_old = (struct nss_qdisc *)qdisc_priv(*old);
+ struct nss_qdisc *nq_old = (struct nss_qdisc *)qdisc_priv(((struct Qdisc *)(*old)));
nss_qdisc_info("Detaching old: %px\n", *old);
nim_detach.msg.shaper_configure.config.msg.shaper_node_config.qos_tag = cl->nq.qos_tag;
if (nss_qdisc_node_detach(&cl->nq, nq_old, &nim_detach,
--- a/nss_qdisc/nss_htb.c
+++ b/nss_qdisc/nss_htb.c
@@ -642,7 +642,7 @@ static int nss_htb_graft_class(struct Qd
nss_qdisc_info("grafting old: %x with new: %x\n", (*old)->handle, new->handle);
if (*old != &noop_qdisc) {
nss_qdisc_trace("detaching old: %x\n", (*old)->handle);
- nq_old = qdisc_priv(*old);
+ nq_old = qdisc_priv(((struct Qdisc *)(*old)));
nim_detach.msg.shaper_configure.config.msg.shaper_node_config.qos_tag = cl->nq.qos_tag;
nim_detach.msg.shaper_configure.config.msg.shaper_node_config.snc.htb_group_detach.child_qos_tag = nq_old->qos_tag;
if (nss_qdisc_node_detach(&cl->nq, nq_old, &nim_detach,
--- a/nss_qdisc/nss_prio.c
+++ b/nss_qdisc/nss_prio.c
@@ -341,7 +341,7 @@ static int nss_prio_graft(struct Qdisc *
nss_qdisc_info("Grafting old: %px with new: %px\n", *old, new);
if (*old != &noop_qdisc) {
- struct nss_qdisc *nq_old = qdisc_priv(*old);
+ struct nss_qdisc *nq_old = qdisc_priv(((struct Qdisc *)(*old)));
nss_qdisc_info("Detaching old: %px\n", *old);
nim_detach.msg.shaper_configure.config.msg.shaper_node_config.qos_tag = q->nq.qos_tag;
--- a/nss_qdisc/nss_qdisc.c
+++ b/nss_qdisc/nss_qdisc.c
@@ -374,7 +374,7 @@ static int nss_qdisc_refresh_bshaper_ass
br_update.port_list_count = 0;
br_update.unassign_count = 0;
- read_lock(&dev_base_lock);
+ //read_lock(&dev_base_lock);
dev = first_net_device(&init_net);
while(dev) {
@@ -421,7 +421,7 @@ static int nss_qdisc_refresh_bshaper_ass
nextdev:
dev = next_net_device(dev);
}
- read_unlock(&dev_base_lock);
+ //read_unlock(&dev_base_lock);
nss_qdisc_info("List count %d\n", br_update.port_list_count);
--- a/nss_qdisc/nss_tbl.c
+++ b/nss_qdisc/nss_tbl.c
@@ -350,7 +350,7 @@ static int nss_tbl_graft(struct Qdisc *s
nss_qdisc_info("Grafting old: %px with new: %px\n", *old, new);
if (*old != &noop_qdisc) {
- struct nss_qdisc *nq_old = (struct nss_qdisc *)qdisc_priv(*old);
+ struct nss_qdisc *nq_old = (struct nss_qdisc *)qdisc_priv(((struct Qdisc *)(*old)));
nss_qdisc_info("Detaching old: %px\n", *old);
nim_detach.msg.shaper_configure.config.msg.shaper_node_config.qos_tag = q->nq.qos_tag;
if (nss_qdisc_node_detach(&q->nq, nq_old, &nim_detach,
--- a/nss_qdisc/nss_wrr.c
+++ b/nss_qdisc/nss_wrr.c
@@ -488,7 +488,7 @@ static int nss_wrr_graft_class(struct Qd
*/
nss_qdisc_info("Grafting old: %px with new: %px\n", *old, new);
if (*old != &noop_qdisc) {
- struct nss_qdisc *nq_child = qdisc_priv(*old);
+ struct nss_qdisc *nq_child = qdisc_priv(((struct Qdisc *)(*old)));
nss_qdisc_info("Detaching old: %px\n", *old);
nim_detach.msg.shaper_configure.config.msg.shaper_node_config.qos_tag = cl->nq.qos_tag;
if (nss_qdisc_node_detach(&cl->nq, nq_child, &nim_detach,
--- a/vlan/nss_vlan_mgr.c
+++ b/vlan/nss_vlan_mgr.c
@@ -1549,7 +1549,7 @@ static int nss_vlan_mgr_update_ppe_tpid(
* nss_vlan_mgr_tpid_proc_handler()
* Sets customer TPID and service TPID
*/
-static int nss_vlan_mgr_tpid_proc_handler(struct ctl_table *ctl,
+static int nss_vlan_mgr_tpid_proc_handler(const struct ctl_table *ctl,
int write, void __user *buffer,
size_t *lenp, loff_t *ppos)
{