log-courier 2.7.1 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/log-courier/client_tcp.rb +1 -1
- data/lib/log-courier/protocol.rb +2 -2
- data/lib/log-courier/server_tcp.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c318bee7d97ff215d852e8980301665d48d8b81a17f6806e2ecbaaa596d9e43f
|
4
|
+
data.tar.gz: ad52cced8f9dad919a2521395db9fb442bb0535fed9b54ac555f9c140e70f917
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 200421b7dae625c4cdd88bc08197a32db9f50248a2e661af785ebae47d84fdacde97413d8c67189fa3047c2611786e0a3fdc28d56547cc87c047c4e644f38cea
|
7
|
+
data.tar.gz: 9ca5c1ef8145659c92a17d9ff0671ac2cc14900ef8d0a052f330055c1c4c55595065a37e0be045642fcd061c029206302f716df2e48012584720fd3622abac60
|
@@ -125,7 +125,7 @@ module LogCourier
|
|
125
125
|
def handshake(io_control)
|
126
126
|
return true if @options[:disable_handshake]
|
127
127
|
|
128
|
-
@socket.write ['HELO',
|
128
|
+
@socket.write ['HELO', 20, 0, 2, 7, 2, 'RYLC'].pack('A4NNNNNA4')
|
129
129
|
|
130
130
|
signature, data = receive
|
131
131
|
if signature != 'VERS'
|
data/lib/log-courier/protocol.rb
CHANGED
@@ -22,9 +22,9 @@ module LogCourier
|
|
22
22
|
# Protocol
|
23
23
|
module Protocol
|
24
24
|
def self.parse_helo_vers(data)
|
25
|
-
data = "\x00\x00\x00\x00\x00\x00\x00\x00" if data.length < 8
|
25
|
+
data = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" if data.length < 8
|
26
26
|
|
27
|
-
flags, major_version, minor_version, patch_version, client = data.unpack('
|
27
|
+
flags, major_version, minor_version, patch_version, client = data.unpack('NNNNA4')
|
28
28
|
client = case client
|
29
29
|
when 'LCOR'
|
30
30
|
'Log Courier'
|
@@ -368,15 +368,15 @@ module LogCourier
|
|
368
368
|
@helo = Protocol.parse_helo_vers(data)
|
369
369
|
@logger&.info 'Remote identified', peer: @peer, client_version: @helo[:client_version]
|
370
370
|
|
371
|
-
# Flags
|
371
|
+
# Flags 4 bytes - EVNT flag = 0
|
372
372
|
# (Significant rewrite would be required to support streaming messages as currently we read
|
373
373
|
# first and then yield for processing. To support EVNT we have to move protocol parsing to
|
374
374
|
# the connection layer here so we can keep reading until we reach the end of the stream)
|
375
|
-
# Major Version
|
376
|
-
# Minor Version
|
377
|
-
# Patch Version
|
375
|
+
# Major Version 4 bytes
|
376
|
+
# Minor Version 4 bytes
|
377
|
+
# Patch Version 4 bytes
|
378
378
|
# Client String 4 bytes
|
379
|
-
data = [
|
379
|
+
data = [0, 2, 7, 2, 'RYLC'].pack('NNNNA4')
|
380
380
|
send 'VERS', data
|
381
381
|
end
|
382
382
|
|