mirror of
https://github.com/threefoldtech/mycelium.git
synced 2026-06-07 00:01:40 +00:00
fixed address encoding bug
This commit is contained in:
@@ -282,11 +282,13 @@ impl Decoder for ControlPacketCodec {
|
||||
)),
|
||||
_ => return Err(io::Error::new(io::ErrorKind::InvalidData, "Invalid address encoding")),
|
||||
};
|
||||
println!("UPDATE decoded successfully!");
|
||||
Some(BabelPacketBody {
|
||||
tlv_type,
|
||||
length,
|
||||
body: BabelTLV::Update { address_encoding, prefix_length, interval, seqno, metric, prefix }
|
||||
})
|
||||
|
||||
}
|
||||
// Add decoding logic for other TLV types.
|
||||
_ => None,
|
||||
|
||||
+1
-1
@@ -247,7 +247,7 @@ impl Router {
|
||||
tlv_type: BabelTLVType::Update,
|
||||
length: 14,
|
||||
body: BabelTLV::Update {
|
||||
address_encoding: 1, // AE of 1 indicated IPv4
|
||||
address_encoding: 0, // AE of 1 indicated IPv4
|
||||
prefix_length: 32, // temp value - working with full IPv4 for now, not prefix-based
|
||||
interval: 999, // temp value
|
||||
seqno: 0, // temp value
|
||||
|
||||
Reference in New Issue
Block a user