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

Add IPv6 support #25

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open

Add IPv6 support #25

wants to merge 43 commits into from

Conversation

Alphix
Copy link

@Alphix Alphix commented Feb 7, 2024

This PR adds IPv6 support to mdns-repeater.

I've broken it out into a long list of patches which kind of track the history of rewriting the daemon. In the process I've removed some hardcoded limitations (like the number of interfaces).

I realise that it might be a bit difficult to review the individual patches. It might be better to just read through mdns-repeater.c with the whole patchset applied.

Alphix added 30 commits February 4, 2024 13:42
Check the return value from all functions, make sure to close the socket on
error and make sure the sizeof() calls are consistent (sometime the type was
used, sometimes the structs themselves).
This is in preparation for later patches.
This adds a double-linked list implementation taken from the Linux kernel.
This is in preparation for the next patch which switches to a poll()-based
event loop.
This is a preparatory step to simplify the following changes.
For consistency with recv_sock and to make it clear that these structs
have nothing to do with e.g. struct if_addr or struct in_addr.
This is just in preparation for further changes to send_sock
and recv_sock.
There's still no support in the actual sending/receiving though.
After this change, we can actually receive IPv6 multicast mDNS packets,
but just log and discard them (for now).
IP_MULTICAST_IF isn't FreeBSD specific and SO_BINDDEVICE is Linux-specific,
so use IP_MULTICAST_IF for all platforms.
The function is incomplete (missing address/routes), but the
sockets are not used yet.
This is in preparation for later patches adding multiple net/mask/addr
triplets to send_sock() for IPv6.
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

Successfully merging this pull request may close these issues.

1 participant