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

Bug - user list only show 14 users #114

Closed
eatrisno opened this issue Apr 19, 2022 · 6 comments
Closed

Bug - user list only show 14 users #114

eatrisno opened this issue Apr 19, 2022 · 6 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@eatrisno
Copy link

is there any solution related with this issue ?

thanks

@pashcovich
Copy link
Contributor

which version of the openvpn server and ovpn-admin do you use? And what does your setup look like?

@Fhtgn
Copy link

Fhtgn commented Apr 19, 2022

I think it's because mgmtRead reads only 32768 bytes
i fixed this problem in the following way

func (oAdmin *OvpnAdmin) mgmtRead(conn net.Conn) string {
    recvData := make([]byte, 32768)
    var out string
    var n int                                                                                                                                                                                                                         -
    var err error
    for {
       n, err = conn.Read(recvData)
       if n <= 0 || err != nil {
          break
       } else {
          out += string(recvData[:n])
          if strings.Contains(out, "type 'help' for more info") || strings.Contains(out, "END") {
             break
          }
       }
    }
    return out

@pashcovich
Copy link
Contributor

Oh, really. we need to check it

@vitaliy-sn fyi

@eatrisno
Copy link
Author

is it better to increase the size or loop the list?

@Fhtgn
Copy link

Fhtgn commented Apr 19, 2022

@eatrisno In my opinion, iteration is better. with it you will not reach the limit if the list of users grows even more

@eatrisno
Copy link
Author

eatrisno commented Apr 20, 2022

noted, it is working btw
I tried to increase the size and loop, both worked fine

@pashcovich pashcovich added the bug Something isn't working label Apr 21, 2022
@pashcovich pashcovich self-assigned this May 24, 2022
@pashcovich pashcovich added this to the 2.0 milestone May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants