summaryrefslogtreecommitdiff
path: root/include/net/icmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/icmp.h')
-rw-r--r--include/net/icmp.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/net/icmp.h b/include/net/icmp.h
index 32b159f7ae22..3fc192478aa2 100644
--- a/include/net/icmp.h
+++ b/include/net/icmp.h
@@ -46,16 +46,15 @@ extern void icmp_init(struct net_proto_family *ops);
/* Move into dst.h ? */
extern int xrlim_allow(struct dst_entry *dst, int timeout);
-struct raw_opt {
- struct icmp_filter filter;
-};
-
-/* WARNING: don't change the layout of the members in raw_sock! */
struct raw_sock {
- struct inet_sock inet;
- struct raw_opt raw4;
+ /* inet_sock has to be the first member */
+ struct inet_sock inet;
+ struct icmp_filter filter;
};
-#define raw4_sk(__sk) (&((struct raw_sock *)__sk)->raw4)
+static inline struct raw_sock *raw_sk(const struct sock *sk)
+{
+ return (struct raw_sock *)sk;
+}
#endif /* _ICMP_H */