Skip to content

Commit 052059b

Browse files
committed
Florian Westphal says: ==================== netfilter updates for net-next First 4 Patches, from Yue Haibing, remove unused prototypes in various netfilter headers. Last patch makes nfnetlink_log to always include a packet timestamp, up to now it was only included if the skb had assigned previously. From Maciej Żenczykowski. * tag 'nf-next-2023-08-08' of https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: nfnetlink_log: always add a timestamp netfilter: h323: Remove unused function declarations netfilter: conntrack: Remove unused function declarations netfilter: helper: Remove unused function declarations netfilter: gre: Remove unused function declaration nf_ct_gre_keymap_flush() ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 99ecd6d + 1d85594 commit 052059b

File tree

7 files changed

+2
-19
lines changed

7 files changed

+2
-19
lines changed

include/linux/netfilter/nf_conntrack_h323.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ struct nf_ct_h323_master {
3434
int get_h225_addr(struct nf_conn *ct, unsigned char *data,
3535
TransportAddress *taddr, union nf_inet_addr *addr,
3636
__be16 *port);
37-
void nf_conntrack_h245_expect(struct nf_conn *new,
38-
struct nf_conntrack_expect *this);
39-
void nf_conntrack_q931_expect(struct nf_conn *new,
40-
struct nf_conntrack_expect *this);
4137

4238
struct nfct_h323_nat_hooks {
4339
int (*set_h245_addr)(struct sk_buff *skb, unsigned int protoff,

include/linux/netfilter/nf_conntrack_proto_gre.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ struct nf_ct_gre_keymap {
2525
int nf_ct_gre_keymap_add(struct nf_conn *ct, enum ip_conntrack_dir dir,
2626
struct nf_conntrack_tuple *t);
2727

28-
void nf_ct_gre_keymap_flush(struct net *net);
2928
/* delete keymap entries */
3029
void nf_ct_gre_keymap_destroy(struct nf_conn *ct);
3130

include/net/netfilter/nf_conntrack.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,6 @@ static inline void nf_ct_put(struct nf_conn *ct)
190190
nf_ct_destroy(&ct->ct_general);
191191
}
192192

193-
/* Protocol module loading */
194-
int nf_ct_l3proto_try_module_get(unsigned short l3proto);
195-
void nf_ct_l3proto_module_put(unsigned short l3proto);
196-
197193
/* load module; enable/disable conntrack in this namespace */
198194
int nf_ct_netns_get(struct net *net, u8 nfproto);
199195
void nf_ct_netns_put(struct net *net, u8 nfproto);

include/net/netfilter/nf_conntrack_acct.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,4 @@ static inline void nf_ct_acct_update(struct nf_conn *ct, u32 dir,
7878

7979
void nf_conntrack_acct_pernet_init(struct net *net);
8080

81-
void nf_conntrack_acct_fini(void);
82-
8381
#endif /* _NF_CONNTRACK_ACCT_H */

include/net/netfilter/nf_conntrack_helper.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ static inline void *nfct_help_data(const struct nf_conn *ct)
136136
return (void *)help->data;
137137
}
138138

139-
void nf_conntrack_helper_pernet_init(struct net *net);
140-
141139
int nf_conntrack_helper_init(void);
142140
void nf_conntrack_helper_fini(void);
143141

@@ -182,5 +180,4 @@ void nf_nat_helper_unregister(struct nf_conntrack_nat_helper *nat);
182180
int nf_nat_helper_try_module_get(const char *name, u16 l3num,
183181
u8 protonum);
184182
void nf_nat_helper_put(struct nf_conntrack_helper *helper);
185-
void nf_ct_set_auto_assign_helper_warned(struct net *net);
186183
#endif /*_NF_CONNTRACK_HELPER_H*/

include/net/netfilter/nf_conntrack_labels.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ int nf_connlabels_replace(struct nf_conn *ct,
5252
const u32 *data, const u32 *mask, unsigned int words);
5353

5454
#ifdef CONFIG_NF_CONNTRACK_LABELS
55-
int nf_conntrack_labels_init(void);
5655
int nf_connlabels_get(struct net *net, unsigned int bit);
5756
void nf_connlabels_put(struct net *net);
5857
#else

net/netfilter/nfnetlink_log.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ __build_packet_message(struct nfnl_log_net *log,
470470
sk_buff_data_t old_tail = inst->skb->tail;
471471
struct sock *sk;
472472
const unsigned char *hwhdrp;
473-
ktime_t tstamp;
474473

475474
nlh = nfnl_msg_put(inst->skb, 0, 0,
476475
nfnl_msg_type(NFNL_SUBSYS_ULOG, NFULNL_MSG_PACKET),
@@ -599,10 +598,9 @@ __build_packet_message(struct nfnl_log_net *log,
599598
goto nla_put_failure;
600599
}
601600

602-
tstamp = skb_tstamp_cond(skb, false);
603-
if (hooknum <= NF_INET_FORWARD && tstamp) {
601+
if (hooknum <= NF_INET_FORWARD) {
602+
struct timespec64 kts = ktime_to_timespec64(skb_tstamp_cond(skb, true));
604603
struct nfulnl_msg_packet_timestamp ts;
605-
struct timespec64 kts = ktime_to_timespec64(tstamp);
606604
ts.sec = cpu_to_be64(kts.tv_sec);
607605
ts.usec = cpu_to_be64(kts.tv_nsec / NSEC_PER_USEC);
608606

0 commit comments

Comments
 (0)