From 122fc52cfe25989ec742c89f2f44d6d7617c8cfe Mon Sep 17 00:00:00 2001 From: scruaux Date: Thu, 4 Jul 2024 17:53:49 +0200 Subject: [PATCH 1/2] Update end-user-address.go fix: wrong PDP Type in GTPv1 EUA --- gtpv1/ie/end-user-address.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtpv1/ie/end-user-address.go b/gtpv1/ie/end-user-address.go index aa78874d..5998d24c 100644 --- a/gtpv1/ie/end-user-address.go +++ b/gtpv1/ie/end-user-address.go @@ -79,7 +79,7 @@ func newEUAddrV6(v6 []byte) *IE { EndUserAddress, make([]byte, 18), ) - e.Payload = make([]byte, 18) + e.Payload[0] = pdpTypeIETF e.Payload[1] = 0x57 copy(e.Payload[2:], v6) From 51b8244d2bf7711d424a5a6be90d905e3889bf1d Mon Sep 17 00:00:00 2001 From: scruaux Date: Fri, 5 Jul 2024 10:00:42 +0200 Subject: [PATCH 2/2] fix: test case on EndUserAddress/v6 --- gtpv1/ie/ie_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtpv1/ie/ie_test.go b/gtpv1/ie/ie_test.go index 3abbead2..5c340237 100644 --- a/gtpv1/ie/ie_test.go +++ b/gtpv1/ie/ie_test.go @@ -93,7 +93,7 @@ func TestIEs(t *testing.T) { "EndUserAddress/v6", ie.NewEndUserAddress("2001::1"), []byte{ - 0x80, 0x00, 0x12, 0x00, + 0x80, 0x00, 0x12, 0xf1, 0x57, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, }, }, {