Commit Graph

800 Commits

Author SHA1 Message Date
Michael Davidsaver f44dcbfc77 WIN32 fix 2019-06-26 16:48:31 -07:00
mdavidsaver 9eb5843def Merge pull request #144 from mdavidsaver/idletimeout
TCP Idle Timeout
2019-06-26 15:57:37 -07:00
Michael Davidsaver 05bf0fc453 CAPlugin handle peer NULL data 2019-06-13 10:52:24 -07:00
Michael Davidsaver 5abfc10a82 really echo this time... 2019-06-12 13:25:35 -07:00
Michael Davidsaver a2c106378a avoid deadlock involving fair_queue<T>::clear()
Avoid destroying items while the queue lock is held.
2019-05-29 11:09:24 -07:00
Michael Davidsaver 6dd1346ace further dead code 2019-05-21 08:54:14 -07:00
Michael Davidsaver 9e05b29f35 Don't clear client _outgoingIR on beacon anomaly
No reason to do this, especially w/o locking.  Outgoing used by
a TCP send thread, beacon anomaly handling on UDP receive thread.

Probably means that anomaly handling never happens...
2019-05-21 08:54:14 -07:00
Michael Davidsaver a6e7d7f5fc Remove dead code
aliveNotification() and unresponsiveTransport() never called.
Remove these, and code only referenced through these methods.
2019-05-21 08:54:14 -07:00
Michael Davidsaver c9bd214f7c client proto v2 2019-05-21 08:54:14 -07:00
Michael Davidsaver 2da60b083e Enable client sending of CMD_ECHO 2019-05-21 08:54:14 -07:00
Michael Davidsaver 8d18b4ca3d PVA server protocol v2
Now with idle timeout!
2019-05-21 08:54:14 -07:00
Michael Davidsaver 111a3dde86 RX timeout
Enable idle timeout if both peers have version>=2.
2019-05-21 08:54:14 -07:00
Michael Davidsaver 79e73ab966 AbstractCodec cleanup 2019-05-21 08:54:14 -07:00
Michael Davidsaver a1af3c2c8e echo content 2019-05-21 08:54:14 -07:00
Michael Davidsaver 0f26f39b5b more de-virt getRevision() 2019-05-21 08:51:01 -07:00
Michael Davidsaver 64453e1f1a split client/server protocol version 2019-05-21 08:51:01 -07:00
Michael Davidsaver 1ea70a302b ignore protocol minor version 0
The change from 0 -> 1 included incompatible changes
to CMD_BEACON and several others.

Ignore any UDP messages (beacon or search),
and disconnect any TCP peers, with version==0.
2019-05-21 08:51:01 -07:00
Michael Davidsaver dfeb9fd5a5 more Troubleshoot "no more data in UDP packet" 2019-05-21 08:51:00 -07:00
Michael Davidsaver ecee708d3a redo hexDump
ludicrously inefficient (cf. toHex() ), and inflexible.
2019-05-21 08:51:00 -07:00
Michael Davidsaver 732fd1f771 Troubleshoot "no more data in UDP packet" 2019-05-21 08:45:50 -07:00
Michael Davidsaver 75befddf46 minor 2019-05-20 17:48:10 -07:00
Michael Davidsaver 3a2a3ac148 remove unused getSocketReceiveBufferSize() 2019-05-20 17:48:10 -07:00
Michael Davidsaver d593462613 yet more osdGetRoles 2019-05-20 17:48:10 -07:00
Michael Davidsaver 0084b6e60a de-virt Transport::getRevision()
Makes clear that this is/was only for TCP,
and eliminate redundant storage.  Also apply
locking to this storage.

Use header version directly in search handler.
Correct as only UDP search is actually used atm.
2019-05-20 17:48:10 -07:00
Michael Davidsaver be1bbe4aa8 const-ness 2019-05-20 17:48:10 -07:00
Michael Davidsaver 32ba2f32d0 avoid deprecated ByteBuffer::getArray()
use identical, but not overloaded, getBuffer()
2019-05-19 14:09:38 -07:00
Michael Davidsaver f9ac164ee7 Revert "try to fix downstream win32 linking"
This reverts commit 4f0c4c46a3.
2019-05-16 18:09:47 -07:00
Michael Davidsaver 4f0c4c46a3 try to fix downstream win32 linking 2019-05-16 14:03:45 -07:00
Michael Davidsaver b54cc1f62b remove deprecated namedLockPattern.h 2019-05-16 10:21:52 -07:00
Michael Davidsaver e978a29e5e remove deprecated createFileLogger 2019-05-16 10:21:52 -07:00
Michael Davidsaver baf8d47e1a try to fix windows build failure 2019-05-12 18:18:25 -07:00
Michael Davidsaver 736e0c169a Merge branch 'auth'
* auth:
  fix osdGetRoles
  oops
  Add showauth executable
  getgrouplist() on OSX has different sig.
  auth fix mingw static
  fix search PeerInfo
  PeerInfo in pva/server.h and pva/sharedstate.h
  make PeerInfo available during search phase
  auth status void accidental success.
  minor doc
  always need to link with netapi32 now
  authorize with local group lookup
  Add osdGetRoles()
  authorization framework
  pvasr show PeerInfo
  redo security (aka. access control)
  remove asCheck

# Conflicts:
#	src/server/pv/responseHandlers.h
#	src/server/responseHandlers.cpp
2019-05-12 14:40:29 -07:00
Michael Davidsaver 523cb46e21 fix osdGetRoles
Ignore NGROUPS_MAX.  On Darwin NGROUPS_MAX==16.
The actual limit is higher.

getgrouplist() is weird...
2019-04-29 11:20:06 -07:00
Michael Davidsaver 8415a125d9 minor 2019-04-17 09:38:37 -07:00
Michael Davidsaver 3fa1e83b55 avoid redundant sockaddr -> string 2019-04-17 09:35:43 -07:00
Michael Davidsaver a697008f13 demagic 2019-04-17 09:35:43 -07:00
Michael Davidsaver 31a7b66575 MonitorFIFO relax state requirements for post()
post() while close()d can be a no-op.  Simplify async. close().
May indicate a race with open(), which will fail on type change.
2019-04-17 09:35:43 -07:00
Bruce Hill b3b1e0b2c5 Have env tryGetPropertyAsString() ck for ENV_PARAM default. 2019-04-17 09:34:54 -07:00
Michael Davidsaver 4ea6831800 getgrouplist() on OSX has different sig. 2019-04-10 11:27:46 -07:00
Michael Davidsaver 77a7d53f62 Add MonitorFIFO::getRequester() 2019-03-17 19:31:09 -07:00
Michael Davidsaver ea149f6292 pvac Add ConnectEvent::peerName 2019-03-17 19:30:46 -07:00
Michael Davidsaver 5b14bbef5a drop display.format 2019-02-19 19:58:47 -08:00
Michael Davidsaver 37cb765ed5 minor log message 2019-02-19 19:58:33 -08:00
Michael Davidsaver 22622e91a9 server: detect duplicate channelCreated() calls 2019-02-19 19:58:13 -08:00
Michael Davidsaver d52d8cf5d4 pva/server.h allow createChannel() to return NULL 2019-02-19 19:55:58 -08:00
Michael Davidsaver c5fe16eff2 fix search PeerInfo 2019-02-19 19:54:42 -08:00
Michael Davidsaver 34f53c123a PeerInfo in pva/server.h and pva/sharedstate.h 2019-01-29 19:59:53 -08:00
Michael Davidsaver d8f9ef2557 make PeerInfo available during search phase 2019-01-29 19:59:53 -08:00
Michael Davidsaver bdd2730315 auth status void accidental success.
The default value of _verificationStatus is reported
on auth timeout.  Make sure it isn't success.
2019-01-13 19:04:59 -08:00
Michael Davidsaver b46e0972ea minor doc 2019-01-13 19:04:59 -08:00