summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-09-15 22:00:45 -0700
committerAndrew Bartlett <abartlet@samba.org>2009-09-16 07:18:16 -0700
commite8e8e40505465c65bcf434373ae89c8bbf650f96 (patch)
tree6df33a04e15df6460191dbf055beab7eabd91039
parent89ed2af69d6d6adcaf64d4c576ee8ba41b27b8a5 (diff)
downloadsamba-e8e8e40505465c65bcf434373ae89c8bbf650f96.tar.gz
samba-e8e8e40505465c65bcf434373ae89c8bbf650f96.tar.bz2
samba-e8e8e40505465c65bcf434373ae89c8bbf650f96.zip
s4:rpc_server netgotiate max xmit size with RPC client
Testing against NetAPP showed that clients can object to being told a larger max xmit fragment size than they negotiated. Choose the minimum of the server and client values. Andrew Bartlett
-rw-r--r--source4/rpc_server/dcerpc_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index b529e605c5..f2402605d9 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -636,7 +636,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
}
if (call->conn->cli_max_recv_frag == 0) {
- call->conn->cli_max_recv_frag = call->pkt.u.bind.max_recv_frag;
+ call->conn->cli_max_recv_frag = MIN(0x2000, call->pkt.u.bind.max_recv_frag);
}
if ((call->pkt.pfc_flags & DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN) &&
@@ -658,7 +658,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
pkt.call_id = call->pkt.call_id;
pkt.ptype = DCERPC_PKT_BIND_ACK;
pkt.pfc_flags = DCERPC_PFC_FLAG_FIRST | DCERPC_PFC_FLAG_LAST | extra_flags;
- pkt.u.bind_ack.max_xmit_frag = 0x2000;
+ pkt.u.bind_ack.max_xmit_frag = call->conn->cli_max_recv_frag;
pkt.u.bind_ack.max_recv_frag = 0x2000;
/*