mirror of https://github.com/OpenIPC/firmware.git
44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
diff -drupN a/include/net/ping.h b/include/net/ping.h
|
|
--- a/include/net/ping.h 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/include/net/ping.h 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -71,7 +71,6 @@ void ping_unhash(struct sock *sk);
|
|
int ping_init_sock(struct sock *sk);
|
|
void ping_close(struct sock *sk, long timeout);
|
|
int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len);
|
|
-void ping_err(struct sk_buff *skb, int offset, u32 info);
|
|
int ping_getfrag(void *from, char *to, int offset, int fraglen, int odd,
|
|
struct sk_buff *);
|
|
|
|
@@ -80,7 +79,6 @@ int ping_recvmsg(struct sock *sk, struc
|
|
int ping_common_sendmsg(int family, struct msghdr *msg, size_t len,
|
|
void *user_icmph, size_t icmph_len);
|
|
int ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
|
|
-bool ping_rcv(struct sk_buff *skb);
|
|
|
|
#ifdef CONFIG_PROC_FS
|
|
struct ping_seq_afinfo {
|
|
@@ -98,12 +96,21 @@ void ping_seq_stop(struct seq_file *seq,
|
|
int ping_proc_register(struct net *net, struct ping_seq_afinfo *afinfo);
|
|
void ping_proc_unregister(struct net *net, struct ping_seq_afinfo *afinfo);
|
|
|
|
-int __init ping_proc_init(void);
|
|
-void ping_proc_exit(void);
|
|
#endif
|
|
|
|
+#ifdef CONFIG_IP_PING
|
|
+bool ping_rcv(struct sk_buff *skb);
|
|
+void ping_err(struct sk_buff *skb, int offset, u32 info);
|
|
void __init ping_init(void);
|
|
int __init pingv6_init(void);
|
|
void pingv6_exit(void);
|
|
+#else
|
|
+static inline void ping_init(void) {}
|
|
+static inline int pingv6_init(void) { return 0; }
|
|
+static inline void pingv6_exit(void) { }
|
|
+static inline void ping_err(struct sk_buff *skb, int offset, u32 info) {}
|
|
+static inline bool ping_rcv(struct sk_buff *skb) { return false; }
|
|
+#endif
|
|
+
|
|
|
|
#endif /* _PING_H */
|