-
Notifications
You must be signed in to change notification settings - Fork 72
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
[Bug] TEID is not added to teidmap on Handle Create Session Request #68
Comments
Thanks. I think the second option is better, as it'd be simpler for users. |
Ooh what i forgot for point 2 is it moves the problem now to |
Ah yeah you're right,
As another issue, I think we should consider the design of API again (or at least the name of API should be changed) because what each TEID in |
Yes you have captured all the dilemma I have had for the past few days trying to make this right and intuitive. |
One question - Why is NewFTEID on usersplane being allocated on v2.Conn instead of v1.Conn? |
Fixes: #68 If we pre-declare in the connection what interface types are implemented then during AddSession we can iterate through them and add to teidSessionMap. This will also solve the ambiguous AddTEID on Session and Conn as we remove the method defined on Conn Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Fixes: #68 If we pre-declare in the connection what interface types are implemented then during AddSession we can iterate through them and add to teidSessionMap. This will also solve the ambiguous AddTEID on Session and Conn as we remove the method defined on Conn Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
It seems so. Actually I don't clearly remember what I was thinking when filing #30... 😅
Do you mean the one like this? NewFTEID's primary purpose is to create an GTPv2 F-TEID IE that is to be sent in GTPv2 messages. In the above case the TEID for S5-U interface is chosen by S-GW and sent to P-GW on GTPv2 Create Session Request. Since GTPv2 is responsible for managing the bearer, it should know the TEID assigned to U-Plane interface, too. |
As part of #67 restructuring we added
func (c *Conn) AddTEID(teid uint32, session *Session)
, but this was used only inCreateSession
, which in turn is only used to sendCreateSessionRequest
.go-gtp/v2/conn.go
Lines 505 to 515 in a342610
CreateSessionResponse
message handling in the examples is missing the step of invokingAddTEID
onconn
.This can be rectified in 2 ways -
Add explict call to
func (c *Conn) AddTEID(teid uint32, session *Session)
in the examplesAdd session arg to
func (c *Conn) NewFTEID(ifType uint8, v4, v6 string)
so that TEID is generated and stored at the same time.The text was updated successfully, but these errors were encountered: