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.
Showing the changes to include (2 of 5 files). Show all
Unified · Split
| @@ -379,6 +379,7 @@ struct nf_nat_hook { · 378 unmodified lines | ||
| 379 | 379 | unsigned int (*manip_pkt)(struct sk_buff *skb, struct nf_conn *ct, |
| 380 | 380 | enum nf_nat_manip_type mtype, |
| 381 | 381 | enum ip_conntrack_dir dir); |
| 382 | + void (*remove_nat_bysrc)(struct nf_conn *ct); | |
| 382 | 383 | }; |
| 383 | 384 | |
| 384 | 385 | extern const struct nf_nat_hook __rcu *nf_nat_hook; |
| @@ -79,9 +79,6 @@ void nf_ct_ext_destroy(struct nf_conn *ct); · 78 unmodified lines | ||
| 79 | 79 | void *nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp); |
| 80 | 80 | |
| 81 | 81 | struct nf_ct_ext_type { |
| 82 | − /* Destroys relationships (can be NULL). */ | |
| 83 | − void (*destroy)(struct nf_conn *ct); | |
| 84 | − | |
| 85 | 82 | enum nf_ct_ext_id id; |
| 86 | 83 | }; |
| 87 | 84 | |