Browse Source

add CRC32 subversion fingerprint

main
D4708 3 years ago
parent
commit
f4f9587dbd
  1. 3
      model/ip.php
  2. 1
      peer.php

3
model/ip.php

@ -93,6 +93,7 @@ class ModelIp extends Model { @@ -93,6 +93,7 @@ class ModelIp extends Model {
$inbound,
$version,
$subVersion,
$subVersionCRC32,
$syncNode) {
try {
@ -108,6 +109,7 @@ class ModelIp extends Model { @@ -108,6 +109,7 @@ class ModelIp extends Model {
`inbound` = ?,
`version` = ?,
`subVersion` = ?,
`subVersionCRC32` = ?,
`syncNode` = ?,
`timeAdded` = UNIX_TIMESTAMP()');
@ -123,6 +125,7 @@ class ModelIp extends Model { @@ -123,6 +125,7 @@ class ModelIp extends Model {
$inbound,
$version,
$subVersion,
$subVersionCRC32,
$syncNode]);
return $this->db->lastInsertId();

1
peer.php

@ -93,6 +93,7 @@ if ($peers = $curlPeer->getAll()) { @@ -93,6 +93,7 @@ if ($peers = $curlPeer->getAll()) {
(int) $peer['inbound'],
(int) $peer['version'],
preg_replace('/[^\d]/', '', $peer['subver']),
crc32($peer['subver']),
(isset($peer['syncnode']) ? (int) $peer['syncnode'] : 0));
} else {
$modelLog->add(_('Could not extract peer address or port'));

Loading…
Cancel
Save