Skip to content

Commit

Permalink
netfilter: Fix portid types
Browse files Browse the repository at this point in the history
The netlink portid is an unsigned integer, use this type
also in netfilter.

Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Richard Weinberger authored and David S. Miller committed Apr 13, 2015
1 parent 65bc4f9 commit cc6bc44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions net/netfilter/nfnetlink_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);
Expand Down
7 changes: 3 additions & 4 deletions net/netfilter/nfnetlink_queue_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit cc6bc44

Please sign in to comment.