aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds
diff options
context:
space:
mode:
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/recv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/rds/recv.c b/net/rds/recv.c
index 5c6e9f132026..9f0f17cf6bf9 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -410,6 +410,8 @@ int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
410 410
411 rdsdebug("size %zu flags 0x%x timeo %ld\n", size, msg_flags, timeo); 411 rdsdebug("size %zu flags 0x%x timeo %ld\n", size, msg_flags, timeo);
412 412
413 msg->msg_namelen = 0;
414
413 if (msg_flags & MSG_OOB) 415 if (msg_flags & MSG_OOB)
414 goto out; 416 goto out;
415 417
@@ -485,6 +487,7 @@ int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
485 sin->sin_port = inc->i_hdr.h_sport; 487 sin->sin_port = inc->i_hdr.h_sport;
486 sin->sin_addr.s_addr = inc->i_saddr; 488 sin->sin_addr.s_addr = inc->i_saddr;
487 memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); 489 memset(sin->sin_zero, 0, sizeof(sin->sin_zero));
490 msg->msg_namelen = sizeof(*sin);
488 } 491 }
489 break; 492 break;
490 } 493 }