netlink: Fix portid type in netlink_notify
Subsystems (4)
PATCH v4 1/5 netlink: Fix portid type in netlink_notify
portid is an unsigned integer. Fix netlink_notify to match all other portid user in the kernel.
--- include/linux/netlink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/netlink.h +1 -1
@@ -134,7 +134,7 @@ struct netlink_callback {struct netlink_notify {struct net *net; -int portid; +u32 portid;int protocol; };
Signature · 1 line
1.8.4.5
PATCH v4 2/5 nfc: Fix portid type in urelease_work
portid is an unsigned integer. Fix urelease_work to match all other portid user in the kernel.
--- net/nfc/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/nfc/netlink.c +1 -1
@@ -1584,7 +1584,7 @@ static const struct genl_ops nfc_genl_ops[] = {struct urelease_work {struct work_struct w; -int portid; +u32 portid; };static void nfc_urelease_event_work (struct work_struct *work)
Signature · 1 line
1.8.4.5
PATCH v4 3/5 netfilter: Fix portid types
In reply to Richard WeinbergerThe netlink portid is an unsigned integer, use this type also in netfilter.
--- net/netfilter/nfnetlink_log.c | 4 ++-- net/netfilter/nfnetlink_queue_core.c | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-)
net/netfilter/nfnetlink_log.c +2 -2
@@ -63,7 +63,7 @@ struct nfulnl_instance {struct timer_list timer;struct net *net;struct user_namespace *peer_user_ns;/* User namespace of the peer process */ -int peer_portid;/* PORTID of the peer process */ +u32 peer_portid;/* PORTID of the peer process */ /* configurable parameters */ unsigned int flushtimeout;/* timeout until queue flush */
@@ -152,7 +152,7 @@ static void nfulnl_timer(unsigned long data);static struct nfulnl_instance *instance_create (struct net *net,u_int16_t group_num, -int portid,struct user_namespace *user_ns) +u32 portid,struct user_namespace *user_ns) {struct nfulnl_instance *inst;struct nfnl_log_net *log =nfnl_log_pernet (net);
net/netfilter/nfnetlink_queue_core.c +3 -4
@@ -55,7 +55,7 @@ struct nfqnl_instance {struct hlist_node hlist;/* global list of queues */ struct rcu_head rcu; -int peer_portid; +u32 peer_portid;unsigned int queue_maxlen;unsigned int copy_range;unsigned int queue_dropped;
@@ -110,8 +110,7 @@ instance_lookup(struct nfnl_queue_net *q, u_int16_t queue_num) }static struct nfqnl_instance * -instance_create (struct nfnl_queue_net *q,u_int16_t queue_num, -int portid) +instance_create (struct nfnl_queue_net *q,u_int16_t queue_num,u32 portid) {struct nfqnl_instance *inst;unsigned int h;
@@ -870,7 +869,7 @@ static const struct nla_policy nfqa_verdict_batch_policy[NFQA_MAX+1] = { };static struct nfqnl_instance * -verdict_instance_lookup (struct nfnl_queue_net *q,u16 queue_num,int nlportid) +verdict_instance_lookup (struct nfnl_queue_net *q,u16 queue_num,u32 nlportid) {struct nfqnl_instance *queue;
Signature · 1 line
1.8.4.5
PATCH v4 4/5 netfilter: Fix format string of nfnetlink_queue proc file
In reply to Richard WeinbergerThe printed values are all of type unsigned integer, therefore use %u instead of %d. Otherwise an user can face negative values.
Fixes:
$ cat /proc/net/netfilter/nfnetlink_queue
0 29508 278 2 65531 0 2004213241 -2129885586 1
1 -27747 0 2 65531 0 0 0 1
2 -27748 0 2 65531 0 0 0 1--- net/netfilter/nfnetlink_queue_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nfnetlink_queue_core.c +1 -1
@@ -1251,7 +1251,7 @@ static int seq_show(struct seq_file *s, void *v) {const struct nfqnl_instance *inst = v; - seq_printf(s, "%5d %6d %5d %1d %5d %5d %5d %8d %2d\n", + seq_printf(s, "%5u %6u %5u %1u %5u %5u %5u %8u %2d\n", inst->queue_num, inst->peer_portid, inst->queue_total, inst->copy_mode, inst->copy_range,
Signature · 1 line
1.8.4.5
PATCH v4 5/5 netfilter: Fix format string of nfnetlink_log proc file
In reply to Richard WeinbergerThe printed values are all of type unsigned integer, therefore use %u instead of %d. Otherwise an user can face negative values.
--- net/netfilter/nfnetlink_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nfnetlink_log.c +1 -1
@@ -1007,7 +1007,7 @@ static int seq_show(struct seq_file *s, void *v) {const struct nfulnl_instance *inst = v; - seq_printf(s, "%5d %6d %5d %1d %5d %6d %2d\n", + seq_printf(s, "%5u %6u %5u %1u %5u %6u %2u\n", inst->group_num, inst->peer_portid, inst->qlen, inst->copy_mode, inst->copy_range,
Signature · 1 line
1.8.4.5
Re: [PATCH 3/5 v4] netfilter: Fix portid types
In reply to Richard WeinbergerQuoted 4 lines · Richard Weinberger
The netlink portid is an unsigned integer, use this type also in netfilter.
Signed-off-by Richard Weinberger <[email protected]>
Re: [PATCH 4/5 v4] netfilter: Fix format string of nfnetlink_queue proc file
In reply to Richard WeinbergerQuoted 10 lines · Richard Weinberger
The printed values are all of type unsigned integer, therefore use %u instead of %d. Otherwise an user can face negative values.
Fixes:
$ cat /proc/net/netfilter/nfnetlink_queue 0 29508 278 2 65531 0 2004213241 -2129885586 1 1 -27747 0 2 65531 0 0 0 1 2 -27748 0 2 65531 0 0 0 1Signed-off-by Richard Weinberger <[email protected]>
Re: [PATCH 5/5 v4] netfilter: Fix format string of nfnetlink_log proc file
In reply to Richard WeinbergerQuoted 4 lines · Richard Weinberger
The printed values are all of type unsigned integer, therefore use %u instead of %d. Otherwise an user can face negative values.
Signed-off-by Richard Weinberger <[email protected]>
From: Richard Weinberger <[email protected]>
Date: Mon, 13 Apr 2015 00:52:35 +0200
Quoted 4 lines
portid is an unsigned integer. Fix
netlink_notifyto match all other portid user in the kernel.Signed-off-by Richard Weinberger <[email protected]>
Applied.
David Miller
maintainerRe: [PATCH 2/5 v4] nfc: Fix portid type in urelease_work
In reply to Richard WeinbergerFrom: Richard Weinberger <richard-/[email protected]>
Date: Mon, 13 Apr 2015 00:52:36 +0200
Quoted 4 lines
portid is an unsigned integer. Fix
urelease_workto match all other portid user in the kernel.Signed-off-by Richard Weinberger <richard-/[email protected]>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/5 v4] netfilter: Fix portid types
In reply to Richard WeinbergerFrom: Richard Weinberger <[email protected]>
Date: Mon, 13 Apr 2015 00:52:37 +0200
Quoted 4 lines
The netlink portid is an unsigned integer, use this type also in netfilter.
Signed-off-by Richard Weinberger <[email protected]>
Applied.
Re: [PATCH 4/5 v4] netfilter: Fix format string of nfnetlink_queue proc file
In reply to Richard WeinbergerFrom: Richard Weinberger <[email protected]>
Date: Mon, 13 Apr 2015 00:52:38 +0200
Quoted 10 lines
The printed values are all of type unsigned integer, therefore use %u instead of %d. Otherwise an user can face negative values.
Fixes:
$ cat /proc/net/netfilter/nfnetlink_queue 0 29508 278 2 65531 0 2004213241 -2129885586 1 1 -27747 0 2 65531 0 0 0 1 2 -27748 0 2 65531 0 0 0 1Signed-off-by Richard Weinberger <[email protected]>
Applied.
Re: [PATCH 5/5 v4] netfilter: Fix format string of nfnetlink_log proc file
In reply to Richard WeinbergerFrom: Richard Weinberger <[email protected]>
Date: Mon, 13 Apr 2015 00:52:39 +0200
Quoted 4 lines
The printed values are all of type unsigned integer, therefore use %u instead of %d. Otherwise an user can face negative values.
Signed-off-by Richard Weinberger <[email protected]>
Applied.