Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong decode and encode for pdufield.UDHList #121

Open
skill215 opened this issue Mar 4, 2024 · 1 comment
Open

wrong decode and encode for pdufield.UDHList #121

skill215 opened this issue Mar 4, 2024 · 1 comment

Comments

@skill215
Copy link

skill215 commented Mar 4, 2024

I found that the decode and encode (Bytes(), Len(), SerializeTo()) method for pdufield.UDHList were wrong.
According to 3GPP TS 23.040 Section 9.2.3.4. https://www.etsi.org/deliver/etsi_ts/123000_123099/123040/16.00.00_60/ts_123040v160000p.pdf Each IEI data inside the UDH should not have tailing zeros (0x00)
So we should change following definition

// UDH is a PDU field used for user data header.
type UDH struct {
	IEI      Fixed
	IELength Fixed
	IEData   Variable
}

To:

 type UDH struct {
	IEI      Fixed
	IELength Fixed
	IEData   Raw
}

And redefine the Raw type

@fiorix
Copy link
Owner

fiorix commented Mar 5, 2024

Happy to review a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants