History

netfilter: conntrack: handle ->destroy hook via nat_ops instead

The nat module already exposes a few functions to the conntrack core. Move the nat extension destroy hook to it. After this, no conntrack extension needs a destroy hook. 'struct nf_ct_ext_type' and the register/unregister api can be removed in a followup patch.

Florian Westphal committed 4 years ago

Commit 1bc91a51 parent 5f31edc5 files · +16 −36Browse files

Showing the changes to include (2 of 5 files). Show all

Unified · Split

2 files
  1. include/linux/netfilter.h +1 −0
  2. include/net/netfilter/nf_conntrack_extend.h +0 −3
include/linux/netfilter.h+1−0
@@ -379,6 +379,7 @@ struct nf_nat_hook { · 378 unmodified lines
379379 unsigned int (*manip_pkt)(struct sk_buff *skb, struct nf_conn *ct,
380380 enum nf_nat_manip_type mtype,
381381 enum ip_conntrack_dir dir);
382+ void (*remove_nat_bysrc)(struct nf_conn *ct);
382383 };
383384
384385 extern const struct nf_nat_hook __rcu *nf_nat_hook;
include/net/netfilter/nf_conntrack_extend.h+0−3
@@ -79,9 +79,6 @@ void nf_ct_ext_destroy(struct nf_conn *ct); · 78 unmodified lines
7979 void *nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp);
8080
8181 struct nf_ct_ext_type {
82− /* Destroys relationships (can be NULL). */
83− void (*destroy)(struct nf_conn *ct);
84−
8582 enum nf_ct_ext_id id;
8683 };
8784

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t