wmnsk / go-pfcp

PFCP (Packet Forwarding Control Protocol) in pure Go.
MIT License
124 stars 54 forks source link

UserPlaneIPInformation Parsing ErrUnexpectedEOF #93

Closed gmtstephane closed 1 year ago

gmtstephane commented 2 years ago

Hi, I am tryring to parse UserPlane Information from the Setup Association Response provided by Traveling VPP : https://github.com/travelping/upg-vpp

I got this payoad : []uint8 len: 13, cap: 1456, [41,0,192,168,1,120,6,97,99,99,101,115,115]

I do not really understund the condition l< offset-n , since l=n from above, this mean the offset must be 0 in my case. In my opinion, offset+n must be < l in order to remain in the array size.

Parsing works great without this Eof check.

https://github.com/wmnsk/go-pfcp/blob/1f550ddf039396cf3b89ae6f4123ba8534d93efa/ie/user-plane-ip-resource-information.go#L150-L162

Thanks you