diff --git a/net/socket.c b/net/socket.c index 6664a75aa4..95060e5ca2 100644 --- a/net/socket.c +++ b/net/socket.c @@ -674,8 +674,8 @@ int net_init_socket(const Netdev *netdev, const char *name, assert(netdev->type == NET_CLIENT_DRIVER_SOCKET); sock = &netdev->u.socket; - if (sock->has_listen + sock->has_connect + sock->has_mcast + - sock->has_udp > 1) { + if (sock->has_fd + sock->has_listen + sock->has_connect + sock->has_mcast + + sock->has_udp != 1) { error_report("exactly one of listen=, connect=, mcast= or udp=" " is required"); return -1;