netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ipv4: ping make local stuff static
@ 2013-12-28 19:11 Stephen Hemminger
  2013-12-28 22:06 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2013-12-28 19:11 UTC (permalink / raw)
  To: David Miller; +Cc: Vasiliy Kulikov, netdev

Don't export ping_table or ping_v4_sendmsg. Both are only used
inside ping code.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

---
 include/net/ping.h |    8 --------
 net/ipv4/ping.c    |   10 +++++++---
 2 files changed, 7 insertions(+), 11 deletions(-)

--- a/include/net/ping.h	2013-12-24 15:15:26.753741401 -0800
+++ b/include/net/ping.h	2013-12-24 15:15:59.905295851 -0800
@@ -42,11 +42,6 @@ struct pingv6_ops {
 			     const struct net_device *dev, int strict);
 };
 
-struct ping_table {
-	struct hlist_nulls_head	hash[PING_HTABLE_SIZE];
-	rwlock_t		lock;
-};
-
 struct ping_iter_state {
 	struct seq_net_private  p;
 	int			bucket;
@@ -54,7 +49,6 @@ struct ping_iter_state {
 };
 
 extern struct proto ping_prot;
-extern struct ping_table ping_table;
 #if IS_ENABLED(CONFIG_IPV6)
 extern struct pingv6_ops pingv6_ops;
 #endif
@@ -81,8 +75,6 @@ int  ping_recvmsg(struct kiocb *iocb, st
 		  size_t len, int noblock, int flags, int *addr_len);
 int  ping_common_sendmsg(int family, struct msghdr *msg, size_t len,
 			 void *user_icmph, size_t icmph_len);
-int  ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
-		     size_t len);
 int  ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
 		     size_t len);
 int  ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
--- a/net/ipv4/ping.c	2013-12-24 15:15:26.753741401 -0800
+++ b/net/ipv4/ping.c	2013-12-24 15:15:59.905295851 -0800
@@ -53,8 +53,12 @@
 #include <net/transp_v6.h>
 #endif
 
+struct ping_table {
+	struct hlist_nulls_head	hash[PING_HTABLE_SIZE];
+	rwlock_t		lock;
+};
 
-struct ping_table ping_table;
+static struct ping_table ping_table;
 struct pingv6_ops pingv6_ops;
 EXPORT_SYMBOL_GPL(pingv6_ops);
 
@@ -668,8 +672,8 @@ int ping_common_sendmsg(int family, stru
 }
 EXPORT_SYMBOL_GPL(ping_common_sendmsg);
 
-int ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
-		    size_t len)
+static int ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+			   size_t len)
 {
 	struct net *net = sock_net(sk);
 	struct flowi4 fl4;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] ipv4: ping make local stuff static
  2013-12-28 19:11 [PATCH net-next] ipv4: ping make local stuff static Stephen Hemminger
@ 2013-12-28 22:06 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-12-28 22:06 UTC (permalink / raw)
  To: stephen; +Cc: segoon, netdev

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sat, 28 Dec 2013 11:11:42 -0800

> Don't export ping_table or ping_v4_sendmsg. Both are only used
> inside ping code.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

ping_v4_sendmsg was meant to be used by ping_v6_sendmsg in order to
support ipv4 mapped ipv6 addresses, currently it just returns
-EINVAL.

But yeah, that never happened.

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-28 22:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-28 19:11 [PATCH net-next] ipv4: ping make local stuff static Stephen Hemminger
2013-12-28 22:06 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).