Skip to content

Commit

Permalink
ipv4: ping: Fix recvmsg MSG_OOB error handling.
Browse files Browse the repository at this point in the history
Don't return an uninitialized variable as the error, return
-EOPNOTSUPP instead.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Feb 21, 2012
1 parent 115c9b8 commit a5e7424
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv4/ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ static int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,

pr_debug("ping_recvmsg(sk=%p,sk->num=%u)\n", isk, isk->inet_num);

err = -EOPNOTSUPP;
if (flags & MSG_OOB)
goto out;

Expand Down

0 comments on commit a5e7424

Please sign in to comment.