1

The linux kernel has support for IPv6 SLAAC (stateless address auto-configuration) and is able to process received router advertisement messages.

BUT: As much as I can understand, the kernel is not processing two things of the router advertisement:

  1. 'M'/'O' flag to indicate the existence of a DHCPv6 server in the network (this is stored in the inet6_dev, but never used)
  2. DNS option to pass a DNS server in the RA (this is ignored completely)

Is there a way to retrieve this information from the userspace?

1
  • the rdisc6 command uses raw sockets to receive the M/O information. the rdnssd command uses a netlink option specific to the DNS parameter. You could study these two commands (and their sources) to figure it out. Commented Jun 16, 2021 at 15:36

1 Answer 1

0

It seams like there is no way to retrieve this information from the kernel via netlink

But

I figured out way to retrieve this information through another way thanks to user A.B

I used a raw socket that only listens to icmpv6-router-advertisement messages. This will retrieve the exact same messages as the will kernel.

For example code I recommend you to take a look at the rdnss/icmp.c file in the ndisc6 project as A.B mentioned. https://github.com/nomis/ndisc6/blob/master/rdnss/icmp.c

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.