aaa4j / aaa4j-radius

Java library for building RADIUS clients and RADIUS servers
https://aaa4j.org
Apache License 2.0
26 stars 10 forks source link

analyse VendorSpecific promble #22

Open joshenWang opened 2 months ago

joshenWang commented 2 months ago

Hi~ when i use this project to analyse my radius request, i find some promble This is the message I constructed private static Attribute<?> createVendorSpecificAttribute() { // build VendorSpecificAttribute final VsaData vsaData1 = new VsaData(10415,22,new byte[] { xxxx
}); return new VendorSpecific( vsaData1); }

when i use aaa4j-radous-core to analyse message , it will report null pointer, i see the method of getAttributeDefinition,but i find typeAttributeDefinitionsMap dose not have the key of generator by AttributeType nextType = nextAttribute.getType().with(containerData.getContainedType()); AttributeDefinition<?, ?> attributeDefinition = dictionary.getAttributeDefinition(nextType); int numComplete = attributeDefinition.getAttributeCodec().decode(codecContext, attributeStack); thanks

joshenWang commented 2 months ago

Look forward to your reply

tsyd commented 2 months ago

Hello,

Thank you for reporting this. There was an issue encoding the VendorSpecific attribute when the vendor attribute is not found in the attribute dictionary. This is now fixed in v0.3.1.

Please try the new version:

<dependency>
    <groupId>org.aaa4j.radius</groupId>
    <artifactId>aaa4j-radius-core</artifactId>
    <version>0.3.1</version>
</dependency>
joshenWang commented 2 months ago

Thanks for your reply, i can download this project but i can not pull the depency from the mvnrepository,and i can't find the version of 0.3.1 from the repository

tsyd commented 2 months ago

It's available now: https://central.sonatype.com/artifact/org.aaa4j.radius/aaa4j-radius Sometimes Maven Central takes a few hours to update.

joshenWang commented 2 months ago

thanks