Skip to content

Wrong attribute lengths #35

@fakuivan

Description

@fakuivan

APVs like Tunnel-Type are added to a packet using the function from_tagged_u32, which does not take into account the appropriate length of the attribute. Something similar happens with Tunnel-Medium-Type.

pub fn add_tunnel_type(packet: &mut Packet, tag: Option<&Tag>, value: TunnelType) {
packet.add(AVP::from_tagged_u32(TUNNEL_TYPE_TYPE, tag, value as u32));
}

As mentioned in RFC2868, the length for Tunnel-Type is always 6, and this mismatch can cause problems with clients that strictly follow this. radtest will show attributes that do not follow these standards as Attr-N instead of decoding it into the appropriate name, so this can be useful when trying to detect these issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions