lkml.org 
[lkml]   [2014]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net IPv6]: Fix maximum IPv6 address limit violation
From
From: Balakumaran Kannan <kumaran.4353@gmail.com>
Date: Sat, 05 Apr 2014 17:22:59 +0530

> +#ifdef CONFIG_IPV6_PRIVACY
> + /* When IPv6 privacy extension is enabled, there must
> + * be two IPv6 address slots available.
> + * - One for MAC based address
> + * - Another for temporary address
> + */
> + if (max_addresses > 1)
> + max_addresses--;
> +#endif
> if (!max_addresses ||
> ipv6_count_addresses(in6_dev) < max_addresses)
> ifp = ipv6_add_addr(in6_dev, &addr, NULL,
> --
> 1.7.9.5
>

Your claim is that you're shooting for accurate policy enforcement, but even
you patch doesn't do this.

You are not taking into account whether temporary addresses will even be
created.

An accurate implementation would duplicate all of the special checks that
manage_tempaddrs() does to determine whether a temporary address will be
created or not. In particular, it needs to check if the device is even
configured to use tempaddrs.


\
 
 \ /
  Last update: 2014-04-07 21:41    [W:0.050 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site