Skip to content

Added ServerSession to HandleAuthorRequest and HandleAcctRequest#4

Open
wladwm wants to merge 1 commit into
nwaples:masterfrom
wladwm:master
Open

Added ServerSession to HandleAuthorRequest and HandleAcctRequest#4
wladwm wants to merge 1 commit into
nwaples:masterfrom
wladwm:master

Conversation

@wladwm
Copy link
Copy Markdown

@wladwm wladwm commented Oct 29, 2019

In Author/Acct packet we should not trust RemoteAddr field, so we need access to ServerSession to proper authorize and account events.

…ause some devices does not set correctly RemoteAddr field
@nwaples
Copy link
Copy Markdown
Owner

nwaples commented Dec 16, 2019

Sorry for not looking at this earlier. I will probably get to it over Christmas/New year. Im not sure yet I wan't to give the Acct and Author methods access to the ServerSession directly which has Authentication methods.

@jfdive
Copy link
Copy Markdown

jfdive commented Aug 17, 2021

funny i was about to code this change. Would be great to have it merged.

@jfdive
Copy link
Copy Markdown

jfdive commented Aug 19, 2021

funny i was about to code this change. Would be great to have it merged.

-> this patch does not work at such if using the library (structures are not exported).
-> probably would be good to provide as parameter a struct containing the relevant information that are necessary to be used to implement auth/author/acct functions (in this case local/remote addr for expl)

@wladwm
Copy link
Copy Markdown
Author

wladwm commented Aug 19, 2021

It works for me.

func (h *CdnHandler) HandleAuthenStart(ctx context.Context, a *tacplus.AuthenStart, s *tacplus.ServerSession) *tacplus.AuthenReply {
log.Printf("HandleAuthenStart(%v,%v,%v)\n", ctx, a, s.RemoteAddr())

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

Successfully merging this pull request may close these issues.

3 participants