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
Fixed IPv6 host renaming #7275
Fixed IPv6 host renaming #7275
Conversation
Thanks for the fix. I just checked and there are other areas of the code that would be affected by the sanitized ipv6 address directories. I think the best fix would be to implement a new funciton |
I was afraid of that. Just to be clear, the directories are already sanitized in the current code when first adding a device, this patch makes it possible to rename to/from that. Would you like me to try to find all other places? I'm very new to LibreNMS, but I can give it a shot. |
That would be great. Basically, you are looking for |
…r to modify the escaping in the future.
I think I've found all places now. I haven't been able to test every thing I changed, since I don't have any place to add all applications. But all automatic tests passed at least. :) Please let me know if you find anything weird. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
The inspection completed: No new issues |
Looks great, thanks @Zmegolaz |
This thread has been automatically locked since there has not been any recent activity after it was closed. |
DO NOT DELETE THIS TEXT
Please note
Testers
If you would like to test this pull request then please run:
./scripts/github-apply <pr_id>
, i.e./scripts/github-apply 5926
Renaming a host which contains an IPv6 address fails, as it tries to move a directory with the exact hostname. The actual directory name has some characters escaped.
This commit updates the renamehost() function to trim [] and replace : with _, in the same way as rrd_name() in includes/rrdtool.inc.php does.
This change is