diff --git a/src/codec.rs b/src/codec.rs index fdd5611..9e276bc 100644 --- a/src/codec.rs +++ b/src/codec.rs @@ -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, diff --git a/src/router.rs b/src/router.rs index 9eb3ab3..1f7ce2a 100644 --- a/src/router.rs +++ b/src/router.rs @@ -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