<div>Hi,</div><div><br></div><div>I've created a patch for openconnect v3.14 for Solaris environment.</div><div><br></div><div>[Issue]</div><div>It seems tun_mainloop() assumes that reading data from /dev/tun </div><div>
device only have one packet, and the data must start from the </div><div>beginning of the packet. </div><div>But Solaris's tun driver could include multiple packets into single</div><div>read(2), and the last packet would be truncated because buffer has </div>
<div>only 2,000 byte of the size. Thus, next read(2) would return middle</div><div>of packet data.</div><div>It gets packet data corrupted, and results in lowering a performance.</div><div><br></div><div>[Summary of patch]</div>
<div>Modified tun_mainloop and enabled it to handle multiple packets</div><div>included in single read. </div><div>I believe this code is safe for other OS environments, but just in </div><div>case, I isolated the code within ifdef __sun__ satatement.</div>
<div><br></div><div>Thanks,</div><div><br></div><div>Kazuyoshi Aizawa</div><div><br></div>