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) 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, }, }, {