diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index 915202cb8..75140aa24 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -208,7 +208,8 @@ struct rdp_settings uint32 encryption_method; /* 27 */ uint32 encryption_level; /* 28 */ boolean authentication; /* 29 */ - uint32 paddingB[48 - 30]; /* 30 */ + uint32 negotiationFlags; /* 30 */ + uint32 paddingB[48 - 31]; /* 31 */ /* Connection Settings */ uint32 port; /* 48 */ diff --git a/libfreerdp-core/gcc.c b/libfreerdp-core/gcc.c index bf098685c..2e566634e 100644 --- a/libfreerdp-core/gcc.c +++ b/libfreerdp-core/gcc.c @@ -350,16 +350,20 @@ boolean gcc_read_client_data_blocks(STREAM* s, rdpSettings *settings, int length return true; } -void gcc_write_client_data_blocks(STREAM* s, rdpSettings *settings) +void gcc_write_client_data_blocks(STREAM* s, rdpSettings* settings) { gcc_write_client_core_data(s, settings); gcc_write_client_cluster_data(s, settings); gcc_write_client_security_data(s, settings); gcc_write_client_network_data(s, settings); - gcc_write_client_monitor_data(s, settings); + + /* extended client data supported */ + + if (settings->negotiationFlags) + gcc_write_client_monitor_data(s, settings); } -boolean gcc_read_server_data_blocks(STREAM* s, rdpSettings *settings, int length) +boolean gcc_read_server_data_blocks(STREAM* s, rdpSettings* settings, int length) { uint16 type; uint16 offset = 0; diff --git a/libfreerdp-core/nego.c b/libfreerdp-core/nego.c index 48b8db9b0..43ee42742 100644 --- a/libfreerdp-core/nego.c +++ b/libfreerdp-core/nego.c @@ -84,6 +84,7 @@ boolean nego_connect(rdpNego* nego) /* update settings with negotiated protocol security */ nego->transport->settings->requested_protocols = nego->requested_protocols; nego->transport->settings->selected_protocol = nego->selected_protocol; + nego->transport->settings->negotiationFlags = nego->flags; if(nego->selected_protocol == PROTOCOL_RDP) { @@ -458,12 +459,11 @@ void nego_process_negotiation_request(rdpNego* nego, STREAM* s) void nego_process_negotiation_response(rdpNego* nego, STREAM* s) { - uint8 flags; uint16 length; DEBUG_NEGO("RDP_NEG_RSP"); - stream_read_uint8(s, flags); + stream_read_uint8(s, nego->flags); stream_read_uint16(s, length); stream_read_uint32(s, nego->selected_protocol); @@ -566,6 +566,7 @@ void nego_init(rdpNego* nego) nego->requested_protocols = PROTOCOL_RDP; nego->transport->recv_callback = nego_recv; nego->transport->recv_extra = (void*) nego; + nego->flags = 0; } /** diff --git a/libfreerdp-core/nego.h b/libfreerdp-core/nego.h index 08c3fb0be..800b3b48c 100644 --- a/libfreerdp-core/nego.h +++ b/libfreerdp-core/nego.h @@ -71,6 +71,7 @@ enum RDP_NEG_MSG struct rdp_nego { int port; + uint32 flags; char* hostname; char* cookie; NEGO_STATE state;