kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Understanding the working of Optimistic DAD Feature.
@ 2020-02-06 12:19 Chinmay Agarwal
  2020-02-06 17:12 ` Valdis Klētnieks
  0 siblings, 1 reply; 2+ messages in thread
From: Chinmay Agarwal @ 2020-02-06 12:19 UTC (permalink / raw)
  To: Kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 1794 bytes --]

Hi Team,

Had a doubt regarding Optimistic DAD implementation in linux kernel.


The RFC of Optimistic DAD states:



"Section 3.3

        A router SHOULD NOT configure an Optimistic Address."

To check the same there is a condition in kernel code wherein we check if ipv6.devconf_all is set.
Now, my query is that we are checking if forwarding is enabled on all interfaces, then we consider the system to be a router.
But even if forwarding is enabled from few interfaces(not all) isn't the system behaving like a router?


void addrconf_add_linklocal<https://elixir.bootlin.com/linux/latest/ident/addrconf_add_linklocal>(struct inet6_dev<https://elixir.bootlin.com/linux/latest/ident/inet6_dev> *idev<https://elixir.bootlin.com/linux/latest/ident/idev>,

                     const struct in6_addr<https://elixir.bootlin.com/linux/latest/ident/in6_addr> *addr, u32<https://elixir.bootlin.com/linux/latest/ident/u32> flags)

{

  .

  .

  .

  .



#ifdef<https://elixir.bootlin.com/linux/latest/ident/ifdef> CONFIG_IPV6_OPTIMISTIC_DAD

  if ((dev_net<https://elixir.bootlin.com/linux/latest/ident/dev_net>(idev<https://elixir.bootlin.com/linux/latest/ident/idev>->dev)->ipv6.devconf_all->optimistic_dad ||

       idev<https://elixir.bootlin.com/linux/latest/ident/idev>->cnf.optimistic_dad) &&

      !dev_net<https://elixir.bootlin.com/linux/latest/ident/dev_net>(idev<https://elixir.bootlin.com/linux/latest/ident/idev>->dev)->ipv6.devconf_all->forwarding<https://elixir.bootlin.com/linux/latest/ident/forwarding>)

          cfg<https://elixir.bootlin.com/linux/latest/ident/cfg>.ifa_flags |= IFA_F_OPTIMISTIC<https://elixir.bootlin.com/linux/latest/ident/IFA_F_OPTIMISTIC>;

#endif



  .

  .

  .

  .

}

Thanks
Chinmay


[-- Attachment #1.2: Type: text/html, Size: 12334 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-06 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 12:19 Understanding the working of Optimistic DAD Feature Chinmay Agarwal
2020-02-06 17:12 ` Valdis Klētnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).