mirror of
https://github.com/LiBwrt/nss-packages.git
synced 2025-12-17 09:34:52 +00:00
qca-nss-clients & qca-nss-ecm: add kernel 6.12 support
This commit is contained in:
parent
02135827f5
commit
8e2637d6fb
@ -739,7 +739,7 @@ define Build/Compile
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS) -Wno-missing-declarations -Wno-missing-prototypes -Wno-enum-conversion" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS) -Wno-missing-declarations -Wno-missing-prototypes -Wno-enum-conversion -Wno-empty-body" \
|
||||
DTLSMGR_DIR="$(DTLSMGR_DIR)" \
|
||||
IPSECMGR_DIR="$(IPSECMGR_DIR)" \
|
||||
SoC=$(SOC) \
|
||||
|
||||
@ -1,95 +0,0 @@
|
||||
--- a/bridge/nss_bridge_mgr.c
|
||||
+++ b/bridge/nss_bridge_mgr.c
|
||||
@@ -177,14 +177,16 @@ static int nss_bridge_mgr_enable_fdb_lea
|
||||
disable_fdb_learning:
|
||||
newaddr_lrn.lrn_en = 0;
|
||||
newaddr_lrn.action = FAL_MAC_FRWRD;
|
||||
- if (fal_vsi_newaddr_lrn_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &newaddr_lrn))
|
||||
+ if (fal_vsi_newaddr_lrn_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &newaddr_lrn)) {
|
||||
nss_bridge_mgr_warn("%px: Failed to disable FDB learning for Bridge vsi\n", br);
|
||||
+ }
|
||||
|
||||
disable_sta_move:
|
||||
sta_move.stamove_en = 0;
|
||||
sta_move.action = FAL_MAC_FRWRD;
|
||||
- if (fal_vsi_stamove_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &sta_move))
|
||||
+ if (fal_vsi_stamove_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &sta_move)) {
|
||||
nss_bridge_mgr_warn("%px: Failed to disable station move for Bridge vsi\n", br);
|
||||
+ }
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -242,14 +244,16 @@ static int nss_bridge_mgr_disable_fdb_le
|
||||
enable_fdb_learning:
|
||||
newaddr_lrn.lrn_en = 1;
|
||||
newaddr_lrn.action = FAL_MAC_FRWRD;
|
||||
- if (fal_vsi_newaddr_lrn_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &newaddr_lrn))
|
||||
+ if (fal_vsi_newaddr_lrn_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &newaddr_lrn)) {
|
||||
nss_bridge_mgr_warn("%px: Failed to enable FDB learning for Bridge vsi\n", br);
|
||||
+ }
|
||||
|
||||
enable_sta_move:
|
||||
sta_move.stamove_en = 1;
|
||||
sta_move.action = FAL_MAC_FRWRD;
|
||||
- if (fal_vsi_stamove_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &sta_move))
|
||||
+ if (fal_vsi_stamove_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &sta_move)) {
|
||||
nss_bridge_mgr_warn("%px: Failed to enable station move for Bridge vsi\n", br);
|
||||
+ }
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -323,10 +327,10 @@ static int nss_bridge_mgr_add_bond_slave
|
||||
|
||||
if (nss_bridge_tx_join_msg(b_pvt->ifnum,
|
||||
slave) != NSS_TX_SUCCESS) {
|
||||
- if (ppe_port_vsi_set(NSS_BRIDGE_MGR_SWITCH_ID, port_id, *port_vsi))
|
||||
+ if (ppe_port_vsi_set(NSS_BRIDGE_MGR_SWITCH_ID, port_id, *port_vsi)) {
|
||||
nss_bridge_mgr_warn("%px: Couldn't set bridge VSI for port %d\n", b_pvt, port_id);
|
||||
- nss_bridge_mgr_warn("%px: Couldn't add port %d in bridge",
|
||||
- b_pvt, port_id);
|
||||
+ }
|
||||
+ nss_bridge_mgr_warn("%px: Couldn't add port %d in bridge", b_pvt, port_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1005,9 +1009,9 @@ int nss_bridge_mgr_unregister_br(struct
|
||||
* Please refer to the function bridge_configure_vsi_unassign
|
||||
* in NSS firmware for detailed operation.
|
||||
*/
|
||||
- if (nss_bridge_tx_vsi_unassign_msg(b_pvt->ifnum, b_pvt->vsi) != NSS_TX_SUCCESS)
|
||||
+ if (nss_bridge_tx_vsi_unassign_msg(b_pvt->ifnum, b_pvt->vsi) != NSS_TX_SUCCESS) {
|
||||
nss_bridge_mgr_warn("%px: failed to unassign vsi\n", b_pvt);
|
||||
-
|
||||
+ }
|
||||
ppe_vsi_free(NSS_BRIDGE_MGR_SWITCH_ID, b_pvt->vsi);
|
||||
|
||||
/*
|
||||
@@ -1486,7 +1490,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 +1539,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/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)
|
||||
{
|
||||
@ -0,0 +1,137 @@
|
||||
--- 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)
|
||||
{
|
||||
@ -1,3 +1,50 @@
|
||||
--- a/ecm_interface.c
|
||||
+++ b/ecm_interface.c
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
#include <net/addrconf.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <linux/inet.h>
|
||||
#include <linux/in6.h>
|
||||
@@ -1285,7 +1285,7 @@ static bool ecm_interface_find_route_by_
|
||||
* it is using to communicate with that IP address.
|
||||
*/
|
||||
ECM_IP_ADDR_TO_NIN4_ADDR(be_addr, addr);
|
||||
- ecm_rt->rt.rtv4 = ip_route_output(&init_net, be_addr, 0, 0, 0);
|
||||
+ ecm_rt->rt.rtv4 = ip_route_output(&init_net, be_addr, 0, 0, 0, 0);
|
||||
if (IS_ERR(ecm_rt->rt.rtv4)) {
|
||||
DEBUG_TRACE("No output route to: %pI4n\n", &be_addr);
|
||||
return false;
|
||||
@@ -1476,7 +1476,7 @@ struct neighbour *ecm_interface_ipv4_nei
|
||||
__be32 ipv4_addr;
|
||||
|
||||
ECM_IP_ADDR_TO_NIN4_ADDR(ipv4_addr, addr);
|
||||
- rt = ip_route_output(&init_net, ipv4_addr, 0, 0, 0);
|
||||
+ rt = ip_route_output(&init_net, ipv4_addr, 0, 0, 0, 0);
|
||||
if (IS_ERR(rt)) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -8768,7 +8768,7 @@ int ecm_interface_wifi_event_stop(void)
|
||||
* ecm_interface_igs_enabled_handler()
|
||||
* IGS enabled check sysctl node handler.
|
||||
*/
|
||||
-static int ecm_interface_igs_enabled_handler(struct ctl_table *ctl, int write, void __user *buffer,
|
||||
+static int ecm_interface_igs_enabled_handler(const struct ctl_table *ctl, int write, void __user *buffer,
|
||||
size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
int ret;
|
||||
@@ -8809,7 +8809,7 @@ static int ecm_interface_igs_enabled_han
|
||||
* ecm_interface_src_check_handler()
|
||||
* Source interface check sysctl node handler.
|
||||
*/
|
||||
-static int ecm_interface_src_check_handler(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
+static int ecm_interface_src_check_handler(const struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
int ret;
|
||||
int current_value;
|
||||
--- a/ecm_classifier_default.c
|
||||
+++ b/ecm_classifier_default.c
|
||||
@@ -32,7 +32,7 @@
|
||||
@ -75,6 +122,17 @@
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <linux/inet.h>
|
||||
--- a/ecm_db/ecm_db.c
|
||||
+++ b/ecm_db/ecm_db.c
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/ecm_db/ecm_db_connection.c
|
||||
+++ b/ecm_db/ecm_db_connection.c
|
||||
@@ -31,7 +31,7 @@
|
||||
@ -82,6 +140,268 @@
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
@@ -700,7 +700,7 @@ EXPORT_SYMBOL(ecm_db_connection_node_add
|
||||
void ecm_db_connection_iface_name_get(struct ecm_db_connection_instance *ci, ecm_db_obj_dir_t dir, char *name_buffer)
|
||||
{
|
||||
DEBUG_CHECK_MAGIC(ci, ECM_DB_CONNECTION_INSTANCE_MAGIC, "%px: magic failed", ci);
|
||||
- strlcpy(name_buffer, ci->node[dir]->iface->name, IFNAMSIZ);
|
||||
+ strscpy(name_buffer, ci->node[dir]->iface->name, IFNAMSIZ);
|
||||
}
|
||||
EXPORT_SYMBOL(ecm_db_connection_iface_name_get);
|
||||
|
||||
--- a/ecm_db/ecm_db_host.c
|
||||
+++ b/ecm_db/ecm_db_host.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/ecm_db/ecm_db_iface.c
|
||||
+++ b/ecm_db/ecm_db_iface.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
@@ -249,7 +249,7 @@ static int ecm_db_iface_state_get_base(s
|
||||
interface_identifier = ii->interface_identifier;
|
||||
ae_interface_identifier = ii->ae_interface_identifier;
|
||||
spin_lock_bh(&ecm_db_lock);
|
||||
- strlcpy(name, ii->name, IFNAMSIZ);
|
||||
+ strscpy(name, ii->name, IFNAMSIZ);
|
||||
mtu = ii->mtu;
|
||||
spin_unlock_bh(&ecm_db_lock);
|
||||
|
||||
@@ -1208,7 +1208,7 @@ void ecm_db_iface_interface_name_get(str
|
||||
{
|
||||
DEBUG_CHECK_MAGIC(ii,
|
||||
ECM_DB_IFACE_INSTANCE_MAGIC, "%px: magic failed", ii);
|
||||
- strlcpy(name_buffer, ii->name, IFNAMSIZ);
|
||||
+ strscpy(name_buffer, ii->name, IFNAMSIZ);
|
||||
}
|
||||
EXPORT_SYMBOL(ecm_db_iface_interface_name_get);
|
||||
|
||||
@@ -2790,7 +2790,7 @@ void ecm_db_iface_add_ethernet(struct ec
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -2842,7 +2842,7 @@ void ecm_db_iface_add_lag(struct ecm_db_
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -2893,7 +2893,7 @@ void ecm_db_iface_add_bridge(struct ecm_
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -2944,7 +2944,7 @@ void ecm_db_iface_add_ovs_bridge(struct
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -2993,7 +2993,7 @@ void ecm_db_iface_add_ovs_internal(struc
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3044,7 +3044,7 @@ void ecm_db_iface_add_macvlan(struct ecm
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3095,7 +3095,7 @@ void ecm_db_iface_add_vlan(struct ecm_db
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3149,7 +3149,7 @@ void ecm_db_iface_add_map_t(struct ecm_d
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3201,7 +3201,7 @@ void ecm_db_iface_add_gre_tun(struct ecm
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3253,7 +3253,7 @@ void ecm_db_iface_add_pppoe(struct ecm_d
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3306,7 +3306,7 @@ void ecm_db_iface_add_pppol2tpv2(struct
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3359,7 +3359,7 @@ void ecm_db_iface_add_pptp(struct ecm_db
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3409,7 +3409,7 @@ void ecm_db_iface_add_unknown(struct ecm
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3458,7 +3458,7 @@ void ecm_db_iface_add_loopback(struct ec
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3517,7 +3517,7 @@ void ecm_db_iface_add_sit(struct ecm_db_
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3567,7 +3567,7 @@ void ecm_db_iface_add_tunipip6(struct ec
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3620,7 +3620,7 @@ void ecm_db_iface_add_ipsec_tunnel(struc
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3672,7 +3672,7 @@ void ecm_db_iface_add_rawip(struct ecm_d
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3723,7 +3723,7 @@ void ecm_db_iface_add_ovpn(struct ecm_db
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = type_info->tun_ifnum;
|
||||
@@ -3774,7 +3774,7 @@ void ecm_db_iface_add_vxlan(struct ecm_d
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
--- a/ecm_db/ecm_db_listener.c
|
||||
+++ b/ecm_db/ecm_db_listener.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/ecm_db/ecm_db_mapping.c
|
||||
+++ b/ecm_db/ecm_db_mapping.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/ecm_db/ecm_db_multicast.c
|
||||
+++ b/ecm_db/ecm_db_multicast.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
@ -97,17 +417,17 @@
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/ecm_interface.c
|
||||
+++ b/ecm_interface.c
|
||||
@@ -35,7 +35,7 @@
|
||||
--- a/ecm_db/ecm_db_timer.c
|
||||
+++ b/ecm_db/ecm_db_timer.c
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
#include <net/addrconf.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <linux/inet.h>
|
||||
#include <linux/in6.h>
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/ecm_state.c
|
||||
+++ b/ecm_state.c
|
||||
@@ -21,7 +21,7 @@
|
||||
@ -163,105 +483,6 @@
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <linux/inet.h>
|
||||
--- a/frontends/nss/ecm_nss_ipv4.c
|
||||
+++ b/frontends/nss/ecm_nss_ipv4.c
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
#include <net/addrconf.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <linux/inet.h>
|
||||
--- a/frontends/nss/ecm_nss_ipv6.c
|
||||
+++ b/frontends/nss/ecm_nss_ipv6.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <net/addrconf.h>
|
||||
#include <net/ipv6.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <linux/inet.h>
|
||||
--- a/ecm_db/ecm_db.c
|
||||
+++ b/ecm_db/ecm_db.c
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/ecm_db/ecm_db_host.c
|
||||
+++ b/ecm_db/ecm_db_host.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/ecm_db/ecm_db_iface.c
|
||||
+++ b/ecm_db/ecm_db_iface.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/ecm_db/ecm_db_listener.c
|
||||
+++ b/ecm_db/ecm_db_listener.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/ecm_db/ecm_db_mapping.c
|
||||
+++ b/ecm_db/ecm_db_mapping.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/ecm_db/ecm_db_multicast.c
|
||||
+++ b/ecm_db/ecm_db_multicast.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/ecm_db/ecm_db_timer.c
|
||||
+++ b/ecm_db/ecm_db_timer.c
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <net/route.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <net/ip6_route.h>
|
||||
--- a/examples/ecm_pcc_test.c
|
||||
+++ b/examples/ecm_pcc_test.c
|
||||
@@ -28,7 +28,7 @@
|
||||
@ -273,6 +494,52 @@
|
||||
#include <linux/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <linux/inet.h>
|
||||
--- a/frontends/ecm_front_end_common.c
|
||||
+++ b/frontends/ecm_front_end_common.c
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/version.h>
|
||||
+#include <linux/vmalloc.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/debugfs.h>
|
||||
@@ -914,7 +915,7 @@ uint64_t ecm_front_end_get_slow_packet_c
|
||||
* ecm_front_end_ppe_fse_enable_limit_handler()
|
||||
* Sysctl to enable/disable FSE programming through PPE.
|
||||
*/
|
||||
-int ecm_front_end_ppe_fse_enable_handler(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
+int ecm_front_end_ppe_fse_enable_handler(const struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -949,7 +950,7 @@ int ecm_front_end_ppe_fse_enable_handler
|
||||
* ecm_front_end_db_conn_limit_handler()
|
||||
* Database connection limit sysctl node handler.
|
||||
*/
|
||||
-int ecm_front_end_db_conn_limit_handler(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
+int ecm_front_end_db_conn_limit_handler(const struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
int ret;
|
||||
int current_value;
|
||||
@@ -1169,7 +1170,7 @@ static int ecm_front_end_denied_ports_ha
|
||||
* ecm_front_end_udp_denied_ports_handler()
|
||||
* Proc handler function for UDP denied ports read/write operation.
|
||||
*/
|
||||
-static int ecm_front_end_udp_denied_ports_handler(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
+static int ecm_front_end_udp_denied_ports_handler(const struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
/*
|
||||
* Usage:
|
||||
@@ -1189,7 +1190,7 @@ static int ecm_front_end_udp_denied_port
|
||||
* ecm_front_end_tcp_denied_ports_handler()
|
||||
* Proc handler function for TCP denied ports read/write operation.
|
||||
*/
|
||||
-static int ecm_front_end_tcp_denied_ports_handler(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
+static int ecm_front_end_tcp_denied_ports_handler(const struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
/*
|
||||
* Usage:
|
||||
--- a/frontends/cmn/ecm_bond_notifier.c
|
||||
+++ b/frontends/cmn/ecm_bond_notifier.c
|
||||
@@ -35,7 +35,7 @@
|
||||
@ -368,6 +635,28 @@
|
||||
#include <net/ipv6.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <linux/inet.h>
|
||||
--- a/frontends/nss/ecm_nss_ipv4.c
|
||||
+++ b/frontends/nss/ecm_nss_ipv4.c
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <net/ip.h>
|
||||
#include <net/tcp.h>
|
||||
#include <net/addrconf.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
#include <linux/inet.h>
|
||||
--- a/frontends/nss/ecm_nss_ipv6.c
|
||||
+++ b/frontends/nss/ecm_nss_ipv6.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <net/addrconf.h>
|
||||
#include <net/ipv6.h>
|
||||
#include <net/tcp.h>
|
||||
-#include <asm/unaligned.h>
|
||||
+#include <linux/unaligned.h>
|
||||
#include <asm/uaccess.h> /* for put_user */
|
||||
#include <net/ipv6.h>
|
||||
@ -1,286 +0,0 @@
|
||||
--- a/frontends/ecm_front_end_common.c
|
||||
+++ b/frontends/ecm_front_end_common.c
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/version.h>
|
||||
+#include <linux/vmalloc.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/debugfs.h>
|
||||
@@ -914,7 +915,7 @@ uint64_t ecm_front_end_get_slow_packet_c
|
||||
* ecm_front_end_ppe_fse_enable_limit_handler()
|
||||
* Sysctl to enable/disable FSE programming through PPE.
|
||||
*/
|
||||
-int ecm_front_end_ppe_fse_enable_handler(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
+int ecm_front_end_ppe_fse_enable_handler(const struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -949,7 +950,7 @@ int ecm_front_end_ppe_fse_enable_handler
|
||||
* ecm_front_end_db_conn_limit_handler()
|
||||
* Database connection limit sysctl node handler.
|
||||
*/
|
||||
-int ecm_front_end_db_conn_limit_handler(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
+int ecm_front_end_db_conn_limit_handler(const struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
int ret;
|
||||
int current_value;
|
||||
@@ -1169,7 +1170,7 @@ static int ecm_front_end_denied_ports_ha
|
||||
* ecm_front_end_udp_denied_ports_handler()
|
||||
* Proc handler function for UDP denied ports read/write operation.
|
||||
*/
|
||||
-static int ecm_front_end_udp_denied_ports_handler(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
+static int ecm_front_end_udp_denied_ports_handler(const struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
/*
|
||||
* Usage:
|
||||
@@ -1189,7 +1190,7 @@ static int ecm_front_end_udp_denied_port
|
||||
* ecm_front_end_tcp_denied_ports_handler()
|
||||
* Proc handler function for TCP denied ports read/write operation.
|
||||
*/
|
||||
-static int ecm_front_end_tcp_denied_ports_handler(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
+static int ecm_front_end_tcp_denied_ports_handler(const struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
/*
|
||||
* Usage:
|
||||
--- a/ecm_db/ecm_db_iface.c
|
||||
+++ b/ecm_db/ecm_db_iface.c
|
||||
@@ -249,7 +249,7 @@ static int ecm_db_iface_state_get_base(s
|
||||
interface_identifier = ii->interface_identifier;
|
||||
ae_interface_identifier = ii->ae_interface_identifier;
|
||||
spin_lock_bh(&ecm_db_lock);
|
||||
- strlcpy(name, ii->name, IFNAMSIZ);
|
||||
+ strscpy(name, ii->name, IFNAMSIZ);
|
||||
mtu = ii->mtu;
|
||||
spin_unlock_bh(&ecm_db_lock);
|
||||
|
||||
@@ -1208,7 +1208,7 @@ void ecm_db_iface_interface_name_get(str
|
||||
{
|
||||
DEBUG_CHECK_MAGIC(ii,
|
||||
ECM_DB_IFACE_INSTANCE_MAGIC, "%px: magic failed", ii);
|
||||
- strlcpy(name_buffer, ii->name, IFNAMSIZ);
|
||||
+ strscpy(name_buffer, ii->name, IFNAMSIZ);
|
||||
}
|
||||
EXPORT_SYMBOL(ecm_db_iface_interface_name_get);
|
||||
|
||||
@@ -2790,7 +2790,7 @@ void ecm_db_iface_add_ethernet(struct ec
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -2842,7 +2842,7 @@ void ecm_db_iface_add_lag(struct ecm_db_
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -2893,7 +2893,7 @@ void ecm_db_iface_add_bridge(struct ecm_
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -2944,7 +2944,7 @@ void ecm_db_iface_add_ovs_bridge(struct
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -2993,7 +2993,7 @@ void ecm_db_iface_add_ovs_internal(struc
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3044,7 +3044,7 @@ void ecm_db_iface_add_macvlan(struct ecm
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3095,7 +3095,7 @@ void ecm_db_iface_add_vlan(struct ecm_db
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3149,7 +3149,7 @@ void ecm_db_iface_add_map_t(struct ecm_d
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3201,7 +3201,7 @@ void ecm_db_iface_add_gre_tun(struct ecm
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3253,7 +3253,7 @@ void ecm_db_iface_add_pppoe(struct ecm_d
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3306,7 +3306,7 @@ void ecm_db_iface_add_pppol2tpv2(struct
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3359,7 +3359,7 @@ void ecm_db_iface_add_pptp(struct ecm_db
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3409,7 +3409,7 @@ void ecm_db_iface_add_unknown(struct ecm
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3458,7 +3458,7 @@ void ecm_db_iface_add_loopback(struct ec
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3517,7 +3517,7 @@ void ecm_db_iface_add_sit(struct ecm_db_
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3567,7 +3567,7 @@ void ecm_db_iface_add_tunipip6(struct ec
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3620,7 +3620,7 @@ void ecm_db_iface_add_ipsec_tunnel(struc
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3672,7 +3672,7 @@ void ecm_db_iface_add_rawip(struct ecm_d
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
@@ -3723,7 +3723,7 @@ void ecm_db_iface_add_ovpn(struct ecm_db
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = type_info->tun_ifnum;
|
||||
@@ -3774,7 +3774,7 @@ void ecm_db_iface_add_vxlan(struct ecm_d
|
||||
#endif
|
||||
ii->arg = arg;
|
||||
ii->final = final;
|
||||
- strlcpy(ii->name, name, IFNAMSIZ);
|
||||
+ strscpy(ii->name, name, IFNAMSIZ);
|
||||
ii->mtu = mtu;
|
||||
ii->interface_identifier = interface_identifier;
|
||||
ii->ae_interface_identifier = ae_interface_identifier;
|
||||
--- a/ecm_db/ecm_db_connection.c
|
||||
+++ b/ecm_db/ecm_db_connection.c
|
||||
@@ -700,7 +700,7 @@ EXPORT_SYMBOL(ecm_db_connection_node_add
|
||||
void ecm_db_connection_iface_name_get(struct ecm_db_connection_instance *ci, ecm_db_obj_dir_t dir, char *name_buffer)
|
||||
{
|
||||
DEBUG_CHECK_MAGIC(ci, ECM_DB_CONNECTION_INSTANCE_MAGIC, "%px: magic failed", ci);
|
||||
- strlcpy(name_buffer, ci->node[dir]->iface->name, IFNAMSIZ);
|
||||
+ strscpy(name_buffer, ci->node[dir]->iface->name, IFNAMSIZ);
|
||||
}
|
||||
EXPORT_SYMBOL(ecm_db_connection_iface_name_get);
|
||||
|
||||
--- a/ecm_interface.c
|
||||
+++ b/ecm_interface.c
|
||||
@@ -1285,7 +1285,7 @@ static bool ecm_interface_find_route_by_
|
||||
* it is using to communicate with that IP address.
|
||||
*/
|
||||
ECM_IP_ADDR_TO_NIN4_ADDR(be_addr, addr);
|
||||
- ecm_rt->rt.rtv4 = ip_route_output(&init_net, be_addr, 0, 0, 0);
|
||||
+ ecm_rt->rt.rtv4 = ip_route_output(&init_net, be_addr, 0, 0, 0, 0);
|
||||
if (IS_ERR(ecm_rt->rt.rtv4)) {
|
||||
DEBUG_TRACE("No output route to: %pI4n\n", &be_addr);
|
||||
return false;
|
||||
@@ -1476,7 +1476,7 @@ struct neighbour *ecm_interface_ipv4_nei
|
||||
__be32 ipv4_addr;
|
||||
|
||||
ECM_IP_ADDR_TO_NIN4_ADDR(ipv4_addr, addr);
|
||||
- rt = ip_route_output(&init_net, ipv4_addr, 0, 0, 0);
|
||||
+ rt = ip_route_output(&init_net, ipv4_addr, 0, 0, 0, 0);
|
||||
if (IS_ERR(rt)) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -8809,7 +8809,7 @@ static int ecm_interface_igs_enabled_han
|
||||
* ecm_interface_src_check_handler()
|
||||
* Source interface check sysctl node handler.
|
||||
*/
|
||||
-static int ecm_interface_src_check_handler(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
+static int ecm_interface_src_check_handler(const struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
|
||||
{
|
||||
int ret;
|
||||
int current_value;
|
||||
Loading…
Reference in New Issue
Block a user