-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Replace deprecated gethostbyname() #20
Comments
Thanks for the report, and reminder! Great to have it here in the tracker for followup. For anyone feeling up to it, looking in to how pimd implements this is probably a good idea. Much of the code in pimd is based on mrouted (and these days share the same license). So could be a simple porting job. |
I don't think This does not means that |
As far as I know, DVMRP has no IPv6 version (it is based on IGMP, which in IPv6 world is replaced with ICMPv6 multicast listener discovery functions). This reduces the interest of having this issue solved. However, I think the issue still would be interesting to solve, because it's bad to use a deprecated function, no matter for what reason it was deprecated. |
pimd is not IPv6-compatible, there is a pim6d project for that. Both mrouted and pimd are for IPv4. It's probably an easy job to replace gethostbyname() with getaddrinfo(). |
Yes, it's probably not too difficult, but still, it's a more complicated function signature, you have to loop through a linked list of answers, etc. Ideally, you should also try to connect to all found answers to keep only active IP addresses... I have seen tutorials around that pretend it easier than it really is (for example, they forget to zero the I have also found a post saying that |
Then the easiest way is probably to do like pimd does: to just allow interface names or IP addresses |
Ah. That explains why I did not find any conversion from hostname to IP address in |
;-) |
Just a small preliminary analysis:
If I am not wrong, the occurrences in Now for the What do you think? Keep in mind I'm new to this source code and I might as well say nonsense. |
Yep, agreed. I've been meaning to move these old helper tools out of the mrouted repo, so not really a big rush to fix them. Not even sure if they fill any real purpose anymore. |
Indeed. I think I have memories the mbone has been phased out, so at least the |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Finally got to resolve this issue! \o/ |
Congrats 😸 ! I did not check, but feel free to close anyway. |
It'll be closed automatically when i merge the dev branch. (Doing static code analysis atm) Happy Holidays! |
I get the following warnings when building mrouted:
It seems that
gethostbyname()
is not IPv6-compatible, and that it is the reason why it should be replaced.(and I have not the time to do the corresponding pull request, sorry)
The text was updated successfully, but these errors were encountered: