mirror of https://github.com/dswd/vpncloud.git
Fixed parsing and printed length
This commit is contained in:
parent
8930e21663
commit
112e531127
|
@ -8,6 +8,8 @@ This project follows [semantic versioning](http://semver.org).
|
|||
- [fixed] Removing NULL-bytes from interface name
|
||||
- [fixed] Supporting hostnames as peers
|
||||
- [fixed] No longer encrypting multiple times
|
||||
- [fixed] Properly decoding protocol header when sending
|
||||
- [fixed] Corrected size of read data
|
||||
|
||||
### v0.4 (2015-12-22)
|
||||
|
||||
|
|
|
@ -219,8 +219,8 @@ impl<P: Protocol> GenericCloud<P> {
|
|||
}
|
||||
|
||||
fn handle_interface_data(&mut self, payload: &mut [u8], start: usize, end: usize) -> Result<(), Error> {
|
||||
let (src, dst) = try!(P::parse(payload));
|
||||
debug!("Read data from interface: src: {}, dst: {}, {} bytes", src, dst, payload.len());
|
||||
let (src, dst) = try!(P::parse(&payload[start..end]));
|
||||
debug!("Read data from interface: src: {}, dst: {}, {} bytes", src, dst, end-start);
|
||||
match self.table.lookup(&dst) {
|
||||
Some(addr) => {
|
||||
debug!("Found destination for {} => {}", dst, addr);
|
||||
|
|
Loading…
Reference in New Issue