patronus_fati 1.2.0 → 1.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9a7acfd177a783e5557a8e81a9dfe4eee777437
4
- data.tar.gz: 5a8a3889d839f81386008de1f76e4bd68662e62a
3
+ metadata.gz: 834ec87c87d7d827048e86216be2e44976f82799
4
+ data.tar.gz: '09464ed15eba72388c2a8d5d35a196dfb20dea07'
5
5
  SHA512:
6
- metadata.gz: 81a6b3e81d3634847fafaa5da8db3b07c3bcb41e02de0746b74e2d9b55194854302cd12d341b02d828d5a61bb1276d25632373d9147250cef9289473e995d432
7
- data.tar.gz: c69f576ed4fdec47eb42560f9137cca80488b6ae0f79855b41b01800f47efdbe8a7361644693fcf9ef70c91636e88f1262016f9e150d1e32d439bb3ff19845f1
6
+ metadata.gz: 360d209f018964966b6f32539836362e9061924a2ab2859aef83359780610f53877a269cd14fae7490fb980b308214efbc7ba10fd74d0260f6ca3148e78c03fd
7
+ data.tar.gz: 1024400265408e37bcad86eb0dbe37d6007e37586b0d566b601fca49a9791afd27905e278369422a03a1f21561e8b5402c09c965b30cebc13ac6c76ff42f9274
@@ -17,8 +17,10 @@ module PatronusFati::MessageProcessor::Client
17
17
  # obj[:mac] is the client's MAC address
18
18
  # obj[:bssid] is the AP's MAC address
19
19
  unless obj[:bssid].nil? || obj[:bssid].empty? || obj[:bssid] == obj[:mac]
20
- access_point = PatronusFati::DataModels::AccessPoint[obj[:bssid]]
21
- access_point.presence.mark_visible
20
+ if PatronusFati::DataModels::AccessPoint.exists?(obj[:bssid])
21
+ access_point = PatronusFati::DataModels::AccessPoint[obj[:bssid]]
22
+ access_point.presence.mark_visible
23
+ end
22
24
  end
23
25
 
24
26
  # Some messages from kismet come in corrupted with partial MACs. We care
@@ -46,12 +48,18 @@ module PatronusFati::MessageProcessor::Client
46
48
  return if access_point.nil? ||
47
49
  obj[:lasttime] < PatronusFati::DataModels::Connection.current_expiration_threshold
48
50
 
51
+ connection_key = "#{obj[:bssid]}^#{obj[:mac]}"
52
+
53
+ # from_ds are leaking wired assets, allow updating of connections but not
54
+ # creation
55
+ return obj[:type] == 'from_ds' &&
56
+ !PatronusFati::DataModels::Connection.exists?(connection_key)
57
+
49
58
  access_point.add_client(obj[:mac])
50
59
  access_point.announce_changes
51
60
 
52
61
  client.add_access_point(obj[:bssid])
53
62
 
54
- connection_key = "#{obj[:bssid]}^#{obj[:mac]}"
55
63
  connection = PatronusFati::DataModels::Connection[connection_key]
56
64
  connection.presence.mark_visible
57
65
  connection.announce_changes
@@ -1,3 +1,3 @@
1
1
  module PatronusFati
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patronus_fati
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Stelfox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-26 00:00:00.000000000 Z
11
+ date: 2017-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: louis