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 about Walk, which leads to endless loop #48

Open
anhzhi opened this issue Sep 1, 2018 · 0 comments
Open

bug about Walk, which leads to endless loop #48

anhzhi opened this issue Sep 1, 2018 · 0 comments

Comments

@anhzhi
Copy link

anhzhi commented Sep 1, 2018

https://github.com/alouca/gosnmp/blob/master/gosnmp.go#L159
it's needed to consider whether the response is 'endOfMibView'

	for {
		res, err := x.GetNext(oid)
		log.Printf("oid=%s, res=%v, err=%s", oid, res, err)
		if err != nil {
			return results, err
		}
		if res != nil {
			if len(res.Variables) > 0 {
				if res.Variables[0].Type == EndOfMibView {
					break
				`}`

Otherwise, is some situation, this loop will never come to its end!!!

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

No branches or pull requests

1 participant