]> The Tcpdump Group git mirrors - libpcap/commit
Fix up the negotiation, eliminating a failure mode with old clients.
authorGuy Harris <[email protected]>
Tue, 31 Oct 2017 21:43:39 +0000 (14:43 -0700)
committerGuy Harris <[email protected]>
Tue, 31 Oct 2017 21:43:39 +0000 (14:43 -0700)
commit4240cc03f971c4d486bbcd58d3876e8b906ad973
treec41544466f765d06d7fd536aa355b5863c21c246
parent49e9f57437072a7886922f44c5d92938ac0ad033
Fix up the negotiation, eliminating a failure mode with old clients.

If we send a "wrong version number" error message to an old client
(before the changes to support version negotiation) with a version
number other than 0, it'll treat it as a protocol error and return the
wrong error message to the caller.  Instead, if the client's version
number is too old for the server, send back the version number they sent
us; they'll try it again and get the same error, and give up.  (This
would happen only if there's a server that doesn't support version 0;
let's not create so many protocol versions that there's a temptation to
drop older ones.)

Also, add details on protocol versioning and protocol negotiation (the
construction of which pointed out the failure mode).
pcap-rpcap.c
rpcap-protocol.h
rpcapd/daemon.c