diff options
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 19f038739087..e171b780b499 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -703,7 +703,7 @@ EXPORT_SYMBOL_GPL(compat_dccp_getsockopt); | |||
703 | 703 | ||
704 | static int dccp_msghdr_parse(struct msghdr *msg, struct sk_buff *skb) | 704 | static int dccp_msghdr_parse(struct msghdr *msg, struct sk_buff *skb) |
705 | { | 705 | { |
706 | struct cmsghdr *cmsg = CMSG_FIRSTHDR(msg); | 706 | struct cmsghdr *cmsg; |
707 | 707 | ||
708 | /* | 708 | /* |
709 | * Assign an (opaque) qpolicy priority value to skb->priority. | 709 | * Assign an (opaque) qpolicy priority value to skb->priority. |
@@ -717,8 +717,7 @@ static int dccp_msghdr_parse(struct msghdr *msg, struct sk_buff *skb) | |||
717 | */ | 717 | */ |
718 | skb->priority = 0; | 718 | skb->priority = 0; |
719 | 719 | ||
720 | for (; cmsg != NULL; cmsg = CMSG_NXTHDR(msg, cmsg)) { | 720 | for_each_cmsghdr(cmsg, msg) { |
721 | |||
722 | if (!CMSG_OK(msg, cmsg)) | 721 | if (!CMSG_OK(msg, cmsg)) |
723 | return -EINVAL; | 722 | return -EINVAL; |
724 | 723 | ||