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-next>] [day] [month] [year] [list]
Message-ID: <20210818165919.GA24787@legohost>
Date:   Wed, 18 Aug 2021 19:59:19 +0300
From:   Oleg <lego12239@...dex.ru>
To:     netdev@...r.kernel.org
Subject: ipv6 ::1 and lo dev

  Hello.

I try to replace ::1/128 ipv6 address on lo dev with ::1/112 to
access more than 1 address(like with ipv4 127.0.0.1/8). But i get
worked only address which is set on the dev. For example:

~# ip a show dev lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
~# ping -c1 -w1 127.0.0.2
PING 127.0.0.2 (127.0.0.2) 56(84) bytes of data.
64 bytes from 127.0.0.2: icmp_seq=1 ttl=64 time=0.095 ms

--- 127.0.0.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.095/0.095/0.095/0.000 ms

~# ping -c1 -w1 ::2
PING ::2(::2) 56 data bytes

--- ::2 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

Replace ::1/128 with ::1/112 and try again:

~# ip -6 a flush dev lo
~# ip -6 a add dev lo local ::1/112 scope host
~# ip a show dev lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/112 scope host 
       valid_lft forever preferred_lft forever
~# ping -c1 -w1 ::2
PING ::2(::2) 56 data bytes

--- ::2 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

So, this don't work. How can i get the same behaviour for ipv6
loopback addresses as with ipv4?

Thanks!

-- 
Олег Неманов (Oleg Nemanov)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ