netdev-linux: Remove unreachable code in netdev_linux_rx_recv_tap().
authorIlya Maximets <i.maximets@samsung.com>
Wed, 25 Nov 2015 08:23:50 +0000 (11:23 +0300)
committerBen Pfaff <blp@ovn.org>
Thu, 26 Nov 2015 05:58:28 +0000 (21:58 -0800)
While splitting netdev_linux_rx_recv() into netdev_linux_rx_recv_sock()
and netdev_linux_rx_recv_tap() in commit
b73c85181df9 ("netdev-linux: Read packet auxdata to obtain vlan_tid")
error handling part was copied 'as is' to both functions.
But in case of netdev_linux_rx_recv_tap(), according to POSIX, the
number of bytes read shall never be greater than 'size'.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
AUTHORS
lib/netdev-linux.c

diff --git a/AUTHORS b/AUTHORS
index cabb288..79a049e 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -80,6 +80,7 @@ Hao Zheng               hzheng@nicira.com
 Helmut Schaa            helmut.schaa@googlemail.com
 Huanle Han              hanxueluo@gmail.com
 Ian Campbell            Ian.Campbell@citrix.com
+Ilya Maximets           i.maximets@samsung.com
 Isaku Yamahata          yamahata@valinux.co.jp
 James P.                roampune@gmail.com
 James Page              james.page@ubuntu.com
index e047be5..ed78868 100644 (file)
@@ -1040,8 +1040,6 @@ netdev_linux_rxq_recv_tap(int fd, struct dp_packet *buffer)
 
     if (retval < 0) {
         return errno;
-    } else if (retval > size) {
-        return EMSGSIZE;
     }
 
     dp_packet_set_size(buffer, dp_packet_size(buffer) + retval);