fx-tftp 1.0 → 1.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 +4 -4
- data/README.md +1 -1
- data/fx-tftp.gemspec +1 -1
- data/lib/tftp/tftp.rb +4 -2
- data/lib/tftp/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79a4af37fb3400286c1558fdf794e3b4a2d2c0df
|
4
|
+
data.tar.gz: a3e824fe794ee09bcb289e4a6de521c24aeae220
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc23076b93484b290ce805a4693695fd21e88f46d34ae109147df8093b8e76473b3d72bbb9875aa2e6d09981d64fc5033582687af43af47b7a2505f1dc18f63c
|
7
|
+
data.tar.gz: ca859f52ec3b79d7c80a15e40aaede15f4e2557da7547d3e5fe3df3e6f0441de3d7fa84f3aa5226b819ad9c5f505af6886b992213d8bbbdc606dafcad7f8bd32
|
data/README.md
CHANGED
data/fx-tftp.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
|
11
11
|
s.summary = %q{Hackable and ACTUALLY WORKING pure-Ruby TFTP server}
|
12
12
|
s.description = %q{Got carried away a bit with the OOness of the whole thing, so while it won't be the fastest TFTP server it might be the most flexible, at least for pure-Ruby ones. With all the infastructure already in place adding a client should be a breeze, should anyone need it.}
|
13
|
-
s.license = 'BSD'
|
13
|
+
s.license = 'BSD-2-Clause'
|
14
14
|
s.authors = ['Piotr S. Staszewski']
|
15
15
|
s.email = 'p.staszewski@gmail.com'
|
16
16
|
s.homepage = 'https://github.com/drbig/fx-tftp'
|
data/lib/tftp/tftp.rb
CHANGED
@@ -139,7 +139,9 @@ module TFTP
|
|
139
139
|
log :warn, "#{tag} Seq mismatch: #{seq} != #{pkt.seq}"
|
140
140
|
return
|
141
141
|
end
|
142
|
-
|
142
|
+
# Increment with wrap around at 16 bit boundary,
|
143
|
+
# because of tftp block number field size limit.
|
144
|
+
seq = (seq + 1) & 0xFFFF
|
143
145
|
end
|
144
146
|
sock.send(Packet::DATA.new(seq, '').encode, 0) if io.size % 512 == 0
|
145
147
|
rescue ParseError => e
|
@@ -180,7 +182,7 @@ module TFTP
|
|
180
182
|
io.write(pkt.data)
|
181
183
|
sock.send(Packet::ACK.new(seq).encode, 0)
|
182
184
|
break if pkt.last?
|
183
|
-
seq
|
185
|
+
seq = (seq + 1) & 0xFFFF
|
184
186
|
end
|
185
187
|
rescue ParseError => e
|
186
188
|
log :warn, "#{tag} Packet parse error: #{e.to_s}"
|
data/lib/tftp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fx-tftp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr S. Staszewski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubygems-tasks
|
@@ -78,7 +78,7 @@ files:
|
|
78
78
|
- test/packet.rb
|
79
79
|
homepage: https://github.com/drbig/fx-tftp
|
80
80
|
licenses:
|
81
|
-
- BSD
|
81
|
+
- BSD-2-Clause
|
82
82
|
metadata: {}
|
83
83
|
post_install_message:
|
84
84
|
rdoc_options: []
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.
|
99
|
+
rubygems_version: 2.5.1
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: Hackable and ACTUALLY WORKING pure-Ruby TFTP server
|