diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ipv6.h | 3 | ||||
| -rw-r--r-- | include/linux/udp.h | 22 |
2 files changed, 10 insertions, 15 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 9d2999715321..f80c4b3f84a3 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -262,8 +262,7 @@ struct raw6_sock { }; struct udp6_sock { - struct inet_sock inet; - struct udp_opt udp; + struct udp_sock udp; struct ipv6_pinfo inet6; }; diff --git a/include/linux/udp.h b/include/linux/udp.h index 831a3f532a10..b60e0b4a25c4 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h @@ -40,26 +40,22 @@ struct udphdr { #include <net/sock.h> #include <linux/ip.h> -struct udp_opt { - int pending; /* Any pending frames ? */ - unsigned int corkflag; /* Cork is required */ - __u16 encap_type; /* Is this an Encapsulation socket? */ +struct udp_sock { + /* inet_sock has to be the first member */ + struct inet_sock inet; + int pending; /* Any pending frames ? */ + unsigned int corkflag; /* Cork is required */ + __u16 encap_type; /* Is this an Encapsulation socket? */ /* * Following member retains the infomation to create a UDP header * when the socket is uncorked. */ - __u16 len; /* total length of pending frames */ -}; - -/* WARNING: don't change the layout of the members in udp_sock! */ -struct udp_sock { - struct inet_sock inet; - struct udp_opt udp; + __u16 len; /* total length of pending frames */ }; -static inline struct udp_opt * udp_sk(const struct sock *__sk) +static inline struct udp_sock *udp_sk(const struct sock *sk) { - return &((struct udp_sock *)__sk)->udp; + return (struct udp_sock *)sk; } #endif |
