Skip to content

Commit

Permalink
[NETFILTER]: nf_queue: remove unused data pointer
Browse files Browse the repository at this point in the history
Remove the data pointer from struct nf_queue_handler. It has never been used
and is useless for the only handler that really matters, nfnetlink_queue,
since the handler is shared between all instances.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jan 28, 2008
1 parent e3ac529 commit f9d8928
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions include/linux/netfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,7 @@ int compat_nf_getsockopt(struct sock *sk, int pf, int optval,
/* Packet queuing */
struct nf_queue_handler {
int (*outfn)(struct sk_buff *skb, struct nf_info *info,
unsigned int queuenum, void *data);
void *data;
unsigned int queuenum);
char *name;
};
extern int nf_register_queue_handler(int pf,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ip_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)

static int
ipq_enqueue_packet(struct sk_buff *skb, struct nf_info *info,
unsigned int queuenum, void *data)
unsigned int queuenum)
{
int status = -EINVAL;
struct sk_buff *nskb;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/netfilter/ip6_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)

static int
ipq_enqueue_packet(struct sk_buff *skb, struct nf_info *info,
unsigned int queuenum, void *data)
unsigned int queuenum)
{
int status = -EINVAL;
struct sk_buff *nskb;
Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/nf_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static int __nf_queue(struct sk_buff *skb,
}
#endif
afinfo->saveroute(skb, info);
status = qh->outfn(skb, info, queuenum, qh->data);
status = qh->outfn(skb, info, queuenum);

rcu_read_unlock();

Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/nfnetlink_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,

static int
nfqnl_enqueue_packet(struct sk_buff *skb, struct nf_info *info,
unsigned int queuenum, void *data)
unsigned int queuenum)
{
int status = -EINVAL;
struct sk_buff *nskb;
Expand Down

0 comments on commit f9d8928

Please sign in to comment.