aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/inet_diag.h2
-rw-r--r--net/ipv4/inet_diag.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h
index a5b7e910eea..f1362b5447f 100644
--- a/include/linux/inet_diag.h
+++ b/include/linux/inet_diag.h
@@ -22,7 +22,7 @@ struct inet_diag_sockid {
22 22
23/* Request structure */ 23/* Request structure */
24 24
25struct inet_diag_req_compat { 25struct inet_diag_req {
26 __u8 idiag_family; /* Family of addresses. */ 26 __u8 idiag_family; /* Family of addresses. */
27 __u8 idiag_src_len; 27 __u8 idiag_src_len;
28 __u8 idiag_dst_len; 28 __u8 idiag_dst_len;
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index cf23a7cacdd..fcf281819cd 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -909,10 +909,10 @@ static inline int inet_diag_type2proto(int type)
909 909
910static int inet_diag_dump_compat(struct sk_buff *skb, struct netlink_callback *cb) 910static int inet_diag_dump_compat(struct sk_buff *skb, struct netlink_callback *cb)
911{ 911{
912 struct inet_diag_req_compat *rc = NLMSG_DATA(cb->nlh); 912 struct inet_diag_req *rc = NLMSG_DATA(cb->nlh);
913 struct inet_diag_req_v2 req; 913 struct inet_diag_req_v2 req;
914 struct nlattr *bc = NULL; 914 struct nlattr *bc = NULL;
915 int hdrlen = sizeof(struct inet_diag_req_compat); 915 int hdrlen = sizeof(struct inet_diag_req);
916 916
917 req.sdiag_family = AF_UNSPEC; /* compatibility */ 917 req.sdiag_family = AF_UNSPEC; /* compatibility */
918 req.sdiag_protocol = inet_diag_type2proto(cb->nlh->nlmsg_type); 918 req.sdiag_protocol = inet_diag_type2proto(cb->nlh->nlmsg_type);
@@ -929,7 +929,7 @@ static int inet_diag_dump_compat(struct sk_buff *skb, struct netlink_callback *c
929static int inet_diag_get_exact_compat(struct sk_buff *in_skb, 929static int inet_diag_get_exact_compat(struct sk_buff *in_skb,
930 const struct nlmsghdr *nlh) 930 const struct nlmsghdr *nlh)
931{ 931{
932 struct inet_diag_req_compat *rc = NLMSG_DATA(nlh); 932 struct inet_diag_req *rc = NLMSG_DATA(nlh);
933 struct inet_diag_req_v2 req; 933 struct inet_diag_req_v2 req;
934 934
935 req.sdiag_family = rc->idiag_family; 935 req.sdiag_family = rc->idiag_family;
@@ -943,7 +943,7 @@ static int inet_diag_get_exact_compat(struct sk_buff *in_skb,
943 943
944static int inet_diag_rcv_msg_compat(struct sk_buff *skb, struct nlmsghdr *nlh) 944static int inet_diag_rcv_msg_compat(struct sk_buff *skb, struct nlmsghdr *nlh)
945{ 945{
946 int hdrlen = sizeof(struct inet_diag_req_compat); 946 int hdrlen = sizeof(struct inet_diag_req);
947 947
948 if (nlh->nlmsg_type >= INET_DIAG_GETSOCK_MAX || 948 if (nlh->nlmsg_type >= INET_DIAG_GETSOCK_MAX ||
949 nlmsg_len(nlh) < hdrlen) 949 nlmsg_len(nlh) < hdrlen)