Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv4: Make ip_idents_reserve static

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

Signed-off-by: David Ahern <dsahern@kernel.org>
Cc: Eric Dumazet <edumazet@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

David Ahern and committed by
David S. Miller
47ed9442 d192181c

+1 -3
-1
include/net/ip.h
··· 517 517 kfree(p); 518 518 } 519 519 520 - u32 ip_idents_reserve(u32 hash, int segs); 521 520 void __ip_select_ident(struct net *net, struct iphdr *iph, int segs); 522 521 523 522 static inline void ip_select_ident_segs(struct net *net, struct sk_buff *skb,
+1 -2
net/ipv4/route.c
··· 457 457 * if one generator is seldom used. This makes hard for an attacker 458 458 * to infer how many packets were sent between two points in time. 459 459 */ 460 - u32 ip_idents_reserve(u32 hash, int segs) 460 + static u32 ip_idents_reserve(u32 hash, int segs) 461 461 { 462 462 u32 bucket, old, now = (u32)jiffies; 463 463 atomic_t *p_id; ··· 478 478 */ 479 479 return atomic_add_return(segs + delta, p_id) - segs; 480 480 } 481 - EXPORT_SYMBOL(ip_idents_reserve); 482 481 483 482 void __ip_select_ident(struct net *net, struct iphdr *iph, int segs) 484 483 {