fiorix / go-diameter

Diameter stack and Base Protocol (RFC 6733) for the Go programming language
Other
252 stars 143 forks source link

Continue the validate loop to the next Auth Application ID #125

Closed sourabh-nanoti closed 4 years ago

sourabh-nanoti commented 4 years ago

While validating the common application IDs in CEA, the diameter library breaks out with the first non common application ID. Due to this even if there is a common application further in the Auth-Application-ID Avp list in CEA, the diameter library returns a "No Common Application" error code to the application.

Screen Shot 2020-01-20 at 5 19 13 PM Screen Shot 2020-01-20 at 5 18 19 PM

As seen from the images, the app id 4 is in the Auth Application ID list but still I get following error.

session_proxy | E0120 08:41:44.000333 1 connection.go:51] Failed to establish new tcp diameter connection from '10.17.115.18:3880' to '10.16.26.77:36553'; error: no common application, will retry later.

FIX: go-diameter/diam/sm/smparser/app.go instead of returning, we can let the loop continue to the next auth application id instead of return nil, ErrNoCommonApplication

emakeev commented 4 years ago

This breaks smparser unit tests & CER validation. Would https://github.com/fiorix/go-diameter/pull/122 work for your case?

fiorix commented 4 years ago

Just merged #122 in, and it should theoretically fix.

emakeev commented 4 years ago

If #122 does not fix the issue, I added a similar logic for non vendor AppIDs in #126

emakeev commented 4 years ago

closing this PR for now, there were several changes addressing CEA/CER issue & it should be fixed for now. Thanks for finding the issue with CEA validation.