Skip to content

Commit f9d8928

Browse files
kaberdavem330
authored andcommitted
[NETFILTER]: nf_queue: remove unused data pointer
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e3ac529 commit f9d8928

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

include/linux/netfilter.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,7 @@ int compat_nf_getsockopt(struct sock *sk, int pf, int optval,
277277
/* Packet queuing */
278278
struct nf_queue_handler {
279279
int (*outfn)(struct sk_buff *skb, struct nf_info *info,
280-
unsigned int queuenum, void *data);
281-
void *data;
280+
unsigned int queuenum);
282281
char *name;
283282
};
284283
extern int nf_register_queue_handler(int pf,

net/ipv4/netfilter/ip_queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
272272

273273
static int
274274
ipq_enqueue_packet(struct sk_buff *skb, struct nf_info *info,
275-
unsigned int queuenum, void *data)
275+
unsigned int queuenum)
276276
{
277277
int status = -EINVAL;
278278
struct sk_buff *nskb;

net/ipv6/netfilter/ip6_queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
269269

270270
static int
271271
ipq_enqueue_packet(struct sk_buff *skb, struct nf_info *info,
272-
unsigned int queuenum, void *data)
272+
unsigned int queuenum)
273273
{
274274
int status = -EINVAL;
275275
struct sk_buff *nskb;

net/netfilter/nf_queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static int __nf_queue(struct sk_buff *skb,
153153
}
154154
#endif
155155
afinfo->saveroute(skb, info);
156-
status = qh->outfn(skb, info, queuenum, qh->data);
156+
status = qh->outfn(skb, info, queuenum);
157157

158158
rcu_read_unlock();
159159

net/netfilter/nfnetlink_queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
534534

535535
static int
536536
nfqnl_enqueue_packet(struct sk_buff *skb, struct nf_info *info,
537-
unsigned int queuenum, void *data)
537+
unsigned int queuenum)
538538
{
539539
int status = -EINVAL;
540540
struct sk_buff *nskb;

0 commit comments

Comments
 (0)