fix: Raise specific exception for host-blocked ACL messages (Fixes #3779) - #3879
Open
JoeTannous wants to merge 1 commit into
Open
fix: Raise specific exception for host-blocked ACL messages (Fixes #3779)#3879JoeTannous wants to merge 1 commit into
JoeTannous wants to merge 1 commit into
Conversation
- Added NetmikoHostBlockedException class - Modified telnet_login() to detect host blocked messages - Fixes issue ktbyers#3779
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes issue #3779.
The problem:
When a router blocks your IP with an rACL, it sends a message like "You are not permitted to connect from this host" before you even see a login prompt. Netmiko doesn't recognize this, times out, and just says "Authentication failed".
The real issue is the host got rejected before auth even happened - not that the credentials were wrong.
What I changed:
Testing:
Ran the unit tests - 133 passed. The 5 failures are unrelated to this change (missing TTP/Genie deps + a Windows path issue that was already there).
Let me know if you need any changes!