Message ID | 1426246276-15839-4-git-send-email-richard@nod.at (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kalle Valo |
Headers | show |
On Fri, Mar 13, 2015 at 12:31:15PM +0100, Richard Weinberger wrote: > The netlink portid is an unsigned integer, use this type > also in netfilter. This small cleanup I can still take it but... > Signed-off-by: Richard Weinberger <richard@nod.at> > --- > net/netfilter/nfnetlink_log.c | 4 ++-- > net/netfilter/nfnetlink_queue_core.c | 7 ++++--- > 2 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c > index 11d85b3..7f00846 100644 > --- a/net/netfilter/nfnetlink_log.c > +++ b/net/netfilter/nfnetlink_log.c > @@ -62,7 +62,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 */ > + unsigned int peer_portid; /* PORTID of the peer process */ I think you have to use u32 for consistency. Other spots use the datatype for the netlink portid. I think same thing applies to other patches. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 13.03.2015 um 14:01 schrieb Pablo Neira Ayuso: > On Fri, Mar 13, 2015 at 12:31:15PM +0100, Richard Weinberger wrote: >> The netlink portid is an unsigned integer, use this type >> also in netfilter. > > This small cleanup I can still take it but... > >> Signed-off-by: Richard Weinberger <richard@nod.at> >> --- >> net/netfilter/nfnetlink_log.c | 4 ++-- >> net/netfilter/nfnetlink_queue_core.c | 7 ++++--- >> 2 files changed, 6 insertions(+), 5 deletions(-) >> >> diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c >> index 11d85b3..7f00846 100644 >> --- a/net/netfilter/nfnetlink_log.c >> +++ b/net/netfilter/nfnetlink_log.c >> @@ -62,7 +62,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 */ >> + unsigned int peer_portid; /* PORTID of the peer process */ > > I think you have to use u32 for consistency. Other spots use the > datatype for the netlink portid. > > I think same thing applies to other patches. Of course! Will re-spin with u32. Thanks, //richard -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 11d85b3..7f00846 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -62,7 +62,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 */ + unsigned int peer_portid; /* PORTID of the peer process */ /* configurable parameters */ unsigned int flushtimeout; /* timeout until queue flush */ @@ -151,7 +151,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) + unsigned int portid, struct user_namespace *user_ns) { struct nfulnl_instance *inst; struct nfnl_log_net *log = nfnl_log_pernet(net); diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c index 0db8515..1b7f7b8 100644 --- a/net/netfilter/nfnetlink_queue_core.c +++ b/net/netfilter/nfnetlink_queue_core.c @@ -54,7 +54,7 @@ struct nfqnl_instance { struct hlist_node hlist; /* global list of queues */ struct rcu_head rcu; - int peer_portid; + unsigned int peer_portid; unsigned int queue_maxlen; unsigned int copy_range; unsigned int queue_dropped; @@ -110,7 +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) + unsigned int portid) { struct nfqnl_instance *inst; unsigned int h; @@ -860,7 +860,8 @@ 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, + unsigned int nlportid) { struct nfqnl_instance *queue;
The netlink portid is an unsigned integer, use this type also in netfilter. Signed-off-by: Richard Weinberger <richard@nod.at> --- net/netfilter/nfnetlink_log.c | 4 ++-- net/netfilter/nfnetlink_queue_core.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-)