Skip to contentSkip to conversation

ipv4: Make ip_idents_reserve static

PATCH Applied David Ahern 3 participants 3 messages Jan 28, 2022 – Jan 31, 2022

Subsystems (3)
lore
Share & tools
lore

David Ahern

author maintainer
#0 lore raw

PATCH 1/1 ipv4: Make ip_idents_reserve static

ip_idents_reserve is only used in net/ipv4/route.c. Make it static and remove the export.

---
 include/net/ip.h | 1 -
 net/ipv4/route.c | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)
include/net/ip.h +0 -1
index b51bae43b0dd..4fcb48598d2d 100644
@@ -517,7 +517,6 @@ void ip_dst_metrics_put(struct dst_entry *dst)
 		kfree(p);
 }
 
-u32 ip_idents_reserve(u32 hash, int segs);
 void __ip_select_ident(struct net *net, struct iphdr *iph, int segs);
 
 static inline void ip_select_ident_segs(struct net *net, struct sk_buff *skb,
net/ipv4/route.c +1 -2
index e42e283b5515..8b35075088e1 100644
@@ -457,7 +457,7 @@ static u32 *ip_tstamps __read_mostly;
  * if one generator is seldom used. This makes hard for an attacker
  * to infer how many packets were sent between two points in time.
  */
-u32 ip_idents_reserve(u32 hash, int segs)
+static u32 ip_idents_reserve(u32 hash, int segs)
 {
 	u32 bucket, old, now = (u32)jiffies;
 	atomic_t *p_id;
@@ -478,7 +478,6 @@ u32 ip_idents_reserve(u32 hash, int segs)
 	 */
 	return atomic_add_return(segs + delta, p_id) - segs;
 }
-EXPORT_SYMBOL(ip_idents_reserve);
 
 void __ip_select_ident(struct net *net, struct iphdr *iph, int segs)
 {
Signature · 1 line
2.25.1
#2 lore raw
In reply to David Ahern
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 9 lines · On Fri, 28 Jan 2022 16:53:47 -0700 you wrote:

ip_idents_reserve is only used in net/ipv4/route.c. Make it static and remove the export.

---
 include/net/ip.h | 1 -
 net/ipv4/route.c | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

Here is the summary with links:
- [net-next] ipv4: Make ip_idents_reserve static

    https://git.kernel.org/netdev/net-next/c/47ed9442b2ec

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html