Api ipv6 kernel 4.6

0

I'm working on an application made with Netlink in Linux kernel 2.6 And I want to make it work for a Linux kernel 4.6 I'm having problems with the ioctl function.

Before running my application, I generate an ad-hoc connection (via wireless interface) that imposes a global ipv6 address static link 2001 :: d / 64 and then we have a local link ipv6 address (fe80 :: 9eaf: 1ea3 .....) imposed by the system (as a DHCP in ipv4) Then it would look like this:

Then, when running the application, the ipv6 local link address (fe80 :: 9eaf: 1ea3 .....) is initially used as a control packet, but then it is deleted from the interface because the application does not need that address. In other words, the following function is applied:

ioctl (fd, SIOCDIFADDR, & ifr6)

The function deletes the local link (fe80 :: 9eaf: 1ea3 .....) from the wireless interface, and then another local link is created (fe80 :: ba60: e8c6 ...) as indicated in the following image:

This is a problem, since there are ip packages that are generated with this address and should not be so.

For what I was seeing, the new NetworkManager service that works in the most recent versions of Ubuntu 16.10 or 16.04, which always imposes a local ipv6 link address when deleting another (as it happened recently)

Can something else be done? After the time has come, I only need the global address link 2001 :: d to work.

    
asked by Pablo Torrado 29.03.2017 в 14:30
source

0 answers