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

Protocol not available #25

Closed
ne-vlezay80 opened this issue Apr 7, 2020 · 4 comments
Closed

Protocol not available #25

ne-vlezay80 opened this issue Apr 7, 2020 · 4 comments

Comments

@ne-vlezay80
Copy link

Runneng with archlinux:

pim6sd: 18:53:33.417 warning - setsockopt(IPV6_ROUTER_ALERT): Protocol not available

Kernel: 5.4.24-rt15-2-rt

@troglobit
Copy link
Owner

Well, have you checked your kernel config, do you have everything related to IPv6 enabled?

@tycho
Copy link

tycho commented Jun 15, 2020

I just ran into this too. It looks like the kernel doesn't like the socket protocol?

    /* RA packet may be delivered ONLY to IPPROTO_RAW socket */
    if (sk->sk_type != SOCK_RAW || inet_sk(sk)->inet_num != IPPROTO_RAW)
        return -ENOPROTOOPT;

mld6_socket is created with IPPROTO_ICMPV6:

     if ((mld6_socket = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) < 0)

@troglobit
Copy link
Owner

Yup, seems you're right. Linux doesn't support the IPV6_ROUTER_ALERT socket option, as far as I can see -> https://code.woboq.org/linux/linux/net/ipv6/raw.c.html#do_rawv6_setsockopt

I haven't checked, but I'm guessing this works on *BSD, likely originating from the KAME project. So this code, like much else in this restoration project, needs porting to Linux. Any and all help is appreciated! :-)

@troglobit
Copy link
Owner

Warning removed in 6a07b6b. Reasoning inline in code:

On Linux the IPV6_ROUTER_ALERT option can only be modified if the socket() was created
with SOCK_RAW and IPPROTO_RAW, i.e., on Linux this setsockopt() call will fail.

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

3 participants