lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPA1RqBmffQObdTWMxNSNMRTgM9gPjD4KGqk2+MTwdbR34Wkhw@mail.gmail.com>
Date:   Mon, 4 Jun 2018 08:50:49 +0900
From:   吉藤英明 <hideaki.yoshifuji@...aclelinux.com>
To:     Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        yoshfuji@...ux-ipv6.org
Subject: Re: [PATCH net-next] net: ipv6: Generate random IID for addresses on
 RAWIP devices

Hello,

2018-06-04 6:54 GMT+09:00 Subash Abhinov Kasiviswanathan
<subashab@...eaurora.org>:
> RAWIP devices such as rmnet do not have a hardware address and
> instead require the kernel to generate a random IID for the
> temporary addresses. For permanent addresses, the device IID is
> used along with prefix received.
>
> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
> ---
>  net/ipv6/addrconf.c | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index f09afc2..e4c4540 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -2230,6 +2230,18 @@ static int addrconf_ifid_ip6tnl(u8 *eui, struct net_device *dev)
>         return 0;
>  }
>
> +static int addrconf_ifid_rawip(u8 *eui, struct net_device *dev)
> +{
> +       struct in6_addr lladdr;
> +
> +       if (ipv6_get_lladdr(dev, &lladdr, IFA_F_TENTATIVE))
> +               get_random_bytes(eui, 8);

Please be aware of I/G bit and G/L bit.

--yoshfuji

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ