Erstellt vor 3 Jahren

Geschlossen vor 3 Monaten

Zuletzt geändert vor 3 Monaten

#2311 closed defect (fixed)

AICCU can't add ipv6 address to interface sixxs, 7270v3 int

Erstellt von: RomMon Verantwortlicher: er13
Priorität: normal Meilenstein: freetz-next
Komponente: unknown Version: devel
Stichworte: Beobachter:
Product Id: 7270 Firmware Version: 74.x.x

Beschreibung

Hi

I'm running into an issue with Aiccu package not assigning an IPv6 address to the created sixxs interface.
This worked fine with freetz-1.2, and also freetz-trunk 7000, but fail at least from freetz-trunk 7796 onwards.

This is on my 7270v3 with international multi-annex firmware (74.x.x).

If I run Aiccu manually I don't see a failure message:

root@fritz:/var/tmp# aiccu start /var/tmp/aiccu.conf
Tunnel Information for <tunnel-id>:
POP Id      : <pop>
IPv6 Local  : <pop-ip>/64
IPv6 Remote : <my-tunnel-ip>/64
Tunnel Type : ayiya
Adminstate  : enabled
Userstate   : enabled
root@fritz:/var/tmp#

syslog:

Dec 30 15:55:49 fritz local7.debug syslog: sock_getline() : "200 Client Identity accepted"
Dec 30 15:55:49 fritz local7.debug syslog: sock_printf()  : "get unixtime"
Dec 30 15:55:49 fritz local7.debug syslog: sock_getline() : "200 1388415349"


Dec 30 15:55:50 fritz local7.debug syslog: sock_printf()  : "challenge md5"


Dec 30 15:55:52 fritz local7.debug syslog: sock_getline() : "Type: ayiya"


Dec 30 15:55:52 fritz local7.debug syslog: sock_getline() : "IPv6 PrefixLength: 64"
Dec 30 15:55:52 fritz local7.debug syslog: sock_getline() : "Tunnel MTU: 1280"


Dec 30 15:55:52 fritz local7.debug syslog: sock_getline() : "IPv4 Endpoint: ayiya"

Dec 30 15:55:52 fritz local7.debug syslog: sock_getline() : "UserState: enabled"
Dec 30 15:55:52 fritz local7.info syslog: AICCU running as PID 5725
Dec 30 15:55:52 fritz local7.info syslog: [AYIYA-start] : Anything in Anything (draft-02)
Dec 30 15:55:52 fritz local7.info syslog: [AYIYA-tun->tundev] : (Socket to TUN) started

Looking at assigned IPv6 addresses:

root@fritz:/var/mod/root# ip -f inet6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
4: lan: <BROADCAST,MULTICAST,UP,LOWER_UP200> mtu 1500
    inet6 fe80::a:b:c:d/64 scope link
       valid_lft forever preferred_lft forever
5: guest: <BROADCAST,MULTICAST,UP,LOWER_UP200> mtu 1500
    inet6 fe80::a:b:c:d/64 scope link
       valid_lft forever preferred_lft forever
root@fritz:/var/mod/root# 

Manually assigning an IPv6 address to the sixxs interface also fails due to a permission issue (as root):

root@fritz:/var/mod/root# ip -f inet6 addr add <my-tunnel-ip>/64 dev sixxs
ip: RTNETLINK answers: Permission denied
root@fritz:/var/mod/root#

If I try on interface lan, like radvd would do, I succeed:

root@fritz:/var/mod/root# ip -f inet6 addr add <ipv6-prefix>/64 dev lan
root@fritz:/var/mod/root#

On my 7390 it works fine, and also don't see this 'Permission denied' issue while manually assigning an IPv6 address to the sixxs interface.

Anhänge (4)

dot_config.txt (58.2 KB) - hinzugefügt von RomMon vor 3 Jahren.
.config of freetz-trunk 11440
aiccu_2311.patch (833 Byte) - hinzugefügt von RomMon vor 3 Jahren.
new patch for rc.aiccu (using /proc/sys) i.s.o. sysctl
aiccu_2311_er13.patch (685 Byte) - hinzugefügt von er13 vor 3 Monaten.
aiccu_2311_er13_change_default_before_aiccu_start.patch (1.2 KB) - hinzugefügt von er13 vor 3 Monaten.

Alle Anhänge herunterladen als: .zip

Änderungshistorie (26)

Geändert vor 3 Jahren durch RomMon

.config of freetz-trunk 11440

comment:1 Geändert vor 3 Jahren durch cuma

You got a new FritzOS Version by updating the Trunk, so the cause could be that AVM changed something you have to investigate

comment:2 Geändert vor 3 Jahren durch RomMon

Hi Cuma,

Found some info here: http://freetz.org/wiki/help/howtos/development/repack_fw#EntpackenundPackenvonFirmware-Images
I will have a look if I can make something out of that.
Not really sure what to look for…

comment:3 Geändert vor 3 Jahren durch RomMon

Hi Cuma,

I hope you give me some pointers to look at.

I used strace to get more info, but this doesn't help me to understand the issue:
Output from trunk-7796 ():

root@fritz:/var/mod/root# strace -ttT ip -f inet6 addr add 2001:a:b::c:2/64 dev sixxs
23:58:20.010382 execve("/sbin/ip", ["ip", "-f", "inet6", "addr", "add", "2001:a:b::c:2/64", "dev", "sixxs"], [/* 247 vars */]) = 0 <0.002234>
23:58:20.018244 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2aaad000 <0.000156>
23:58:20.019399 open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000179>
23:58:20.020547 open("/mod/lib/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000225>
23:58:20.021507 open("/mod/usr/lib/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000246>
23:58:20.022794 open("/lib/libc.so.0", O_RDONLY) = 3 <0.000211>
23:58:20.023709 fstat(3, {st_mode=S_IFREG|0755, st_size=422800, ...}) = 0 <0.000123>
23:58:20.026667 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2aaae000 <0.000141>
23:58:20.028970 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0000\261\0\0004\0\0\0"..., 4096) = 4096 <0.000275>
23:58:20.030285 mmap(NULL, 512000, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabe000 <0.000156>
23:58:20.031308 mmap(0x2aabe000, 415324, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aabe000 <0.000233>
23:58:20.032294 mmap(0x2ab33000, 8064, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x65000) = 0x2ab33000 <0.000229>
23:58:20.036637 mmap(0x2ab35000, 21744, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab35000 <0.002124>
23:58:20.039585 close(3)                = 0 <0.000114>
23:58:20.040409 munmap(0x2aaae000, 4096) = 0 <0.000186>
23:58:20.041268 stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=21528, ...}) = 0 <0.000184>
23:58:20.045484 mprotect(0x2ab33000, 4096, PROT_READ) = 0 <0.000182>
23:58:20.046507 mprotect(0x2aabc000, 4096, PROT_READ) = 0 <0.000167>
23:58:20.047558 ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0 <0.000134>
23:58:20.048656 ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0 <0.000130>
23:58:20.049868 getuid()                = 0 <0.000110>
23:58:20.050902 socket(PF_NETLINK, SOCK_RAW, 0) = 3 <0.000196>
23:58:20.051782 bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0 <0.000130>
23:58:20.052621 getsockname(3, {sa_family=AF_NETLINK, pid=5946, groups=00000000}, [12]) = 0 <0.000122>
23:58:20.053584 time(NULL)              = 1388962700 <0.000120>
23:58:20.054545 sendto(3, "\24\0\0\0\22\0\1\3\215\343\311R\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20 <0.001699>
23:58:20.059018 brk(0)                  = 0x4a7000 <0.000112>
23:58:20.059746 brk(0x4aa000)           = 0x4aa000 <0.000135>
23:58:20.060595 recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\360\0\0\0\20\0\2\0\215\343\311R:\27\0\0\0\0\4\3\1\0\0\0I\0\1\0\0\0\0\0"..., 8192}], msg_controllen=0, msg_flags=0}, 0) = 2384 <0.000273>
23:58:20.062115 recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\215\343\311R:\27\0\0\0\0\0\0", 8192}], msg_controllen=0, msg_flags=0}, 0) = 20 <0.000149>
23:58:20.065168 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 <0.000197>
23:58:20.066048 ioctl(4, SIOCGIFINDEX, {ifr_name="sixxs", ifr_index=60}) = 0 <0.000141>
23:58:20.067032 close(4)                = 0 <0.000184>
23:58:20.067848 sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"@\0\0\0\24\0\5\0\216\343\311R\0\0\0\0\n@\0\0<\0\0\0\24\0\2\0 \1\6\20"..., 64}], msg_controllen=0, msg_flags=0}, 0) = 64 <0.000285>
23:58:20.069122 recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"T\0\0\0\2\0\0\0\216\343\311R:\27\0\0\363\377\377\377@\0\0\0\24\0\5\0\216\343\311R"..., 8192}], msg_controllen=0, msg_flags=0}, 0) = 84 <0.000152>
23:58:20.070657 brk(0x4ab000)           = 0x4ab000 <0.000138>
23:58:20.071518 brk(0x4ac000)           = 0x4ac000 <0.000137>
23:58:20.072538 write(2, "ip: RTNETLINK answers: Permissio"..., 41ip: RTNETLINK answers: Permission denied
) = 41 <0.000160>
23:58:20.073548 exit(2)                 = ?
23:58:20.074507 +++ exited with 2 +++
root@fritz:/var/mod/root#

Similar output for trunk revision 7000:

root@fritz:/var/mod/root# strace -ttT ip -f inet6 addr add 2001:a:b::c:2/64 dev sixxs
00:31:58.272464 execve("/bin/ip", ["ip", "-f", "inet6", "addr", "add", "2001:a:b::c:2/64", "dev", "sixxs"], [/* 216 vars */]) = 0 <0.002506>
00:31:58.280961 old_mmap(NULL, 20, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaad000 <0.000116>
00:31:58.283625 open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000138>
00:31:58.287345 open("/mod/lib/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) <0.000184>
00:31:58.289885 open("/lib/libc.so.0", O_RDONLY) = 3 <0.000167>
00:31:58.292754 fstat(3, {st_mode=S_IFREG|0644, st_size=460176, ...}) = 0 <0.000096>
00:31:58.296970 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000 <0.000335>
00:31:58.299802 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\0\254\0\0004\0\0\0"..., 4096) = 4096 <0.000486>
00:31:58.302398 old_mmap(NULL, 503808, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabe000 <0.000116>
00:31:58.306594 old_mmap(0x2aabe000, 406420, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aabe000 <0.000544>
00:31:58.309808 old_mmap(0x2ab31000, 8224, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x63000) = 0x2ab31000 <0.000402>
00:31:58.312575 old_mmap(0x2ab34000, 18752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab34000 <0.000154>
00:31:58.316008 close(3)                = 0 <0.000082>
00:31:58.318180 munmap(0x2aaae000, 4096) = 0 <0.000153>
00:31:58.322075 stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=22536, ...}) = 0 <0.000264>
00:31:58.327344 mprotect(0x2ab31000, 4096, PROT_READ) = 0 <0.000134>
00:31:58.330281 mprotect(0x2aabc000, 4096, PROT_READ) = 0 <0.000136>
00:31:58.333986 ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0 <0.000096>
00:31:58.337365 ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0 <0.000095>
00:31:58.340442 getuid()                = 0 <0.000122>
00:31:58.343759 socket(PF_NETLINK, SOCK_RAW, 0) = 3 <0.000153>
00:31:58.346602 bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0 <0.000095>
00:31:58.349915 getsockname(3, {sa_family=AF_NETLINK, pid=4719, groups=00000000}, [12]) = 0 <0.000084>
00:31:58.353526 time(NULL)              = 1388964718 <0.000076>
00:31:58.356467 sendto(3, "\24\0\0\0\22\0\1\3o\353\311R\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20 <0.000308>
00:31:58.359803 brk(0)                  = 0x490d90 <0.000083>
00:31:58.362036 brk(0x493d90)           = 0x493d90 <0.000103>
00:31:58.366295 brk(0x494000)           = 0x494000 <0.000081>
00:31:58.368654 recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\0\1\0\0\20\0\2\0o\353\311Ro\22\0\0\0\0\1\0\1\0\0\0C\20\1\0\0\0\0\0"..., 8192}], msg_controllen=0, msg_flags=0}, 0) = 2700 <0.000259>
00:31:58.373078 recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0o\353\311Ro\22\0\0\0\0\0\0\1\0\0\0C\20\1\0\0\0\0\0"..., 8192}], msg_controllen=0, msg_flags=0}, 0) = 20 <0.000117>
00:31:58.376978 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 <0.000150>
00:31:58.379018 ioctl(4, SIOCGIFINDEX, {ifr_name="sixxs", ifr_index=82}) = 0 <0.000099>
00:31:58.382684 close(4)                = 0 <0.000141>
00:31:58.386845 sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"@\0\0\0\24\0\5\0p\353\311R\0\0\0\0\n@\0\0R\0\0\0\24\0\2\0 \1\6\20"..., 64}], msg_controllen=0, msg_flags=0}, 0) = 64 <0.002909>
00:31:58.391973 recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"$\0\0\0\2\0\0\0p\353\311Ro\22\0\0\0\0\0\0@\0\0\0\24\0\5\0p\353\311R"..., 8192}], msg_controllen=0, msg_flags=0}, 0) = 36 <0.000134>
00:31:58.396094 exit(0)                 = ?
root@fritz:/var/mod/root#

comment:4 Geändert vor 3 Jahren durch oliver

Googling for "ip: RTNETLINK answers: Permission denied" lead me to this: https://www.sixxs.net/forum/?msg=setup-6166310

comment:5 Geändert vor 3 Jahren durch RomMon

Hi Oliver,

Thanks for helping.

I was also looking in that direction using: sysctl -A
but was additionally looking (and got a little lost …) in /proc/net/, not /proc/sys/net/

On the working trunk-revision 7000 all interfaces are IPv6 disabled according sysctl, while the IPv6 tunnel was up.

# sysctl -A | grep -i all
:
net.ipv6.conf.all.disable_ipv6 = 1
:
# sysctl -A | grep -i default
:
net.ipv6.conf.default.disable_ipv6 = 1
:
# sysctl -A | grep -i sixxs
:
net.ipv6.conf.sixxs.disable_ipv6 = 1
:

Still strange there are no other complains on the forum about this.
Seems specific to the 7270v3. My 7390 is working fine without any additional config parameters.

Currently on my 7390 with the tunnel up and running:

# sysctl net.ipv6.conf.default.disable_ipv6
net.ipv6.conf.default.disable_ipv6 = 1
# cat /proc/sys/net/ipv6/conf/default/disable_ipv6
1
# sysctl net.ipv6.conf.all.disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 1
#  cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1
#  sysctl net.ipv6.conf.sixxs.disable_ipv6
net.ipv6.conf.sixxs.disable_ipv6 = 0
# cat /proc/sys/net/ipv6/conf/sixxs/disable_ipv6
0
#

The Internet is currently heavily in use, but if I get the chance will play with the following:

/proc/sys/net/ipv6/conf/<sixxs|default|all>/disable_ipv6
sysctl net.ipv6.conf.<sixxs|default|all>.disable_ipv6
sysctl -w net.ipv6.conf.<sixxs|default|all>.disable_ipv6=0

comment:6 Geändert vor 3 Jahren durch RomMon

A sysctl -w net.ipv6.conf.default.disable_ipv6=0 or sysctl -w net.ipv6.conf.all.disable_ipv6=0 indeed allows an IPv6 address being assigned to the sixxs interface.

Using sysctl -w net.ipv6.conf.sixxs.disable_ipv6=0 and than stop & start AICCU again doesn't work.
After a stop the sixxs interface is removed, and after the start the interface is created again, but than with net.ipv6.conf.sixxs.disable_ipv6=1 again.
After using sysctl -w net.ipv6.conf.default.disable_ipv6=0 the newly created sixxs interface looks to inherit the default value.

Tested with trunk-revision-7796.

The behavior is different from the 7390 where, even if the default is ipv6 disabled, the newly created sixxs interface is ipv6 enabled.


comment:7 Geändert vor 3 Jahren durch er13

So, should some of these "sysctl -w …" be added to rc.aiccu? Could you please test and provide a fix?

comment:8 Geändert vor 3 Jahren durch ralf

I think the AICCU program should set this itself.

comment:9 Geändert vor 3 Jahren durch oliver

Does this switch persist a restart of AVM's multid?

comment:10 Geändert vor 3 Jahren durch RomMon

Just verified with restart of multid, and parameter does persist a restart of AVM multid:

# sysctl net.ipv6.conf.default.disable_ipv6
net.ipv6.conf.default.disable_ipv6 = 0
# sysctl net.ipv6.conf.all.disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 0
# sysctl net.ipv6.conf.sixxs.disable_ipv6
net.ipv6.conf.sixxs.disable_ipv6 = 0

# /etc/init.d/rc.multid restart
Stopping AVM multid ... done.
Starting AVM multid ... done.

# sysctl net.ipv6.conf.default.disable_ipv6
net.ipv6.conf.default.disable_ipv6 = 0
# sysctl net.ipv6.conf.all.disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 0
# sysctl net.ipv6.conf.sixxs.disable_ipv6
net.ipv6.conf.sixxs.disable_ipv6 = 0

Came across following threads:
http://www.ip-phone-forum.de/showthread.php?t=240910&p=1788847&viewfull=1#post1788847
https://www.sixxs.net/forum/?msg=setup-6166310
http://www.ip-phone-forum.de/showthread.php?t=258471
All look only for 7270v3 (suspect both de and int version)

So a few lines should be added in the rc.aiccu script which performs "sysctl -w net.ipv6.conf.all.disable_ipv6=0" if "cat /proc/sys/net/ipv6/conf/all/disable_ipv6" return a '1', but only for the 7270 (v3?).

Is it possible to e.g. patch rc.aiccu for just 7270v3 routers?

comment:11 Geändert vor 3 Jahren durch RomMon

Created a patch to enable ipv6 before aiccu is started.
Tested this patch on a 7170 (doesn't have a disable_ipv6 parameter), 7390, and the target 7270v3.

The patch uses sysctl -w i.s.o. echo > 0. (not sure what is more preferred)

comment:12 Geändert vor 3 Jahren durch ralf

Can you also explain why it is better to include the test for disable_ipv6==1 before setting disable_ipv6=0 ?
It seems that was not effective anyway, else you wouldn't have had the problem.

So that leaves setting all.disable_ipv6=0 as the likely effective part of your patch. What are the effects from this, beyond the effect you want to achieve?

There may be reasons to favor either /proc/sys or sysctl, but why do you mix them?

comment:13 Antwort: Geändert vor 3 Jahren durch RomMon

Hi Ralf,
Thanks for your commends.

Replying to ralf:

Can you also explain why it is better to include the test for disable_ipv6==1 before setting disable_ipv6=0 ?
It seems that was not effective anyway, else you wouldn't have had the problem.

This way I can use 2>/dev/null for the read operation which prevents error messages if the ‘disable_ipv6 parameter’ doesn’t exist like on the 7170, and still get an error message if writing to the ‘disable_ipv6 parameter’ fails. I didn't see any issues, so maybe I'm a bit too cautiously about error handling.
Only trying to write 0 to the ‘disable_ipv6 parameter’ (using echo or sysctl) with redirecting error messages to /dev/null would also work.
What is your view on this? Should I better just use a write instruction and redirecting error messages to /dev/null?

So that leaves setting all.disable_ipv6=0 as the likely effective part of your patch. What are the effects from this, beyond the effect you want to achieve?

The effect is that all interfaces that gets created after rc.aiccu start is executed will have disable_ipv6=0.
On the 7390 I don’t see a noticeable difference in behavior. Should verify on my 7390 a bit more what the effect is (e.g. expect a few more interfaces get a link-local address automatically assigned).
The rc.aiccu already did have a line for disable_ipv6=0 for just the sixxs interface, probably also to solve an issue for a specific issue.

There may be reasons to favor either /proc/sys or sysctl, but why do you mix them?

Indeed not that consistent.
Using time gives similar, all close to 0, results.

time cat /proc/sys/net/ipv6/conf/all/disable_ipv6 
time sysctl net.ipv6.conf.all.disable_ipv6

time echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6
time sysctl -w net.ipv6.conf.all.disable_ipv6=0

Using cat and echo is probably more readable.

Edit (29-05-14: 17:20):
Found reason for the already included echo 0 > …/sixxs/disable_ipv6 in rc.aiccu:
http://freetz.org/browser/trunk/make/aiccu/files/root/etc/init.d/rc.aiccu?rev=6748 > #1076 > also 7270

On my 7390 commented out both disable_ipv6 lines so disable_ipv6 stays '1', and don't see any changed behavior.

# for x in `find  /proc/sys/net/ipv6/conf -name disable_ipv6`; do echo -n "$x: ";cat $x; done
/proc/sys/net/ipv6/conf/all/disable_ipv6: 1
/proc/sys/net/ipv6/conf/default/disable_ipv6: 1
/proc/sys/net/ipv6/conf/lo/disable_ipv6: 0
/proc/sys/net/ipv6/conf/sit0/disable_ipv6: 0
/proc/sys/net/ipv6/conf/cpmac0/disable_ipv6: 1
/proc/sys/net/ipv6/conf/adsl/disable_ipv6: 1
/proc/sys/net/ipv6/conf/eth0/disable_ipv6: 1
/proc/sys/net/ipv6/conf/lan/disable_ipv6: 0
/proc/sys/net/ipv6/conf/guest/disable_ipv6: 0
/proc/sys/net/ipv6/conf/hotspot/disable_ipv6: 1
/proc/sys/net/ipv6/conf/dsl/disable_ipv6: 1
/proc/sys/net/ipv6/conf/wifi0/disable_ipv6: 1
/proc/sys/net/ipv6/conf/wifi1/disable_ipv6: 1
/proc/sys/net/ipv6/conf/ath0/disable_ipv6: 1
/proc/sys/net/ipv6/conf/ath1/disable_ipv6: 1
/proc/sys/net/ipv6/conf/sixxs/disable_ipv6: 1

And sixxs still gets a link-local address automatically assigned, and a global address assigned by aiccu.

Zuletzt geändert vor 3 Jahren von RomMon (vorher) (Diff)

comment:14 als Antwort auf: ↑ 13 Geändert vor 3 Jahren durch ralf

Replying to RomMon:

Replying to ralf:

Can you also explain why it is better to include the test for disable_ipv6==1 before setting disable_ipv6=0 ?
It seems that was not effective anyway, else you wouldn't have had the problem.

This way I can use 2>/dev/null for the read operation which prevents error messages if the ‘disable_ipv6 parameter’ doesn’t exist like on the 7170, and still get an error message if writing to the ‘disable_ipv6 parameter’ fails. I didn't see any issues, so maybe I'm a bit too cautiously about error handling.

This explains why you want to read the value first, but it doesn't address the part whether setting the value has any effect at all. As the part disable_ipv6=0 was present before, it seems that it didn't have the desired effect, or you wouldn't need a change. And if the line has no effect, we should remove it and not make it more complicated.

It seems that disable_ipv6 is available since kernel 2.6.30.

So that leaves setting all.disable_ipv6=0 as the likely effective part of your patch. What are the effects from this, beyond the effect you want to achieve?

The effect is that all interfaces that gets created after rc.aiccu start is executed will have disable_ipv6=0.

Is the default all.disable_ipv6==1, or is that set by the AVM firmware? If so is there a reason they do it, and what might break if that is changed?

Using time gives similar, all close to 0, results.
Using cat and echo is probably more readable.

I agree that the time should be similar and using /proc/sys seems more readable.

On my 7390 commented out both disable_ipv6 lines so disable_ipv6 stays '1', and don't see any changed behavior.

So is there any need for the patch?

comment:15 Geändert vor 3 Jahren durch RomMon

Replying to ralf:

This explains why you want to read the value first, but it doesn't address the part whether setting the value has any effect at all. As the part disable_ipv6=0 was present before, it seems that it didn't have the desired effect, or you wouldn't need a change. And if the line has no effect, we should remove it and not make it more complicated.

Ok, missed your question. Yes the change is needed for the 7270v3 (with xx.05.04 or xx.05.05 and later (current=xx.05.53)), where before aiccu is started all/disable_ipv6 or (default/disable_ipv6) needs to be changed to ‘0’.

Is the default all.disable_ipv6==1, or is that set by the AVM firmware? If so is there a reason they do it, and what might break if that is changed?

The default seems to be all.disable_ipv6==1, but I’m not sure if the AVM fw changes this somewhere during startup.

I agree that the time should be similar and using /proc/sys seems more readable.

Will create a new patch using /proc/sys.

On my 7390 commented out both disable_ipv6 lines so disable_ipv6 stays '1', and don't see any changed behavior.

So is there any need for the patch?

Is needed for 7270v3.

Geändert vor 3 Jahren durch RomMon

new patch for rc.aiccu (using /proc/sys) i.s.o. sysctl

Geändert vor 3 Monaten durch er13

comment:16 Geändert vor 3 Monaten durch er13

@RomMon: I consider changing the value of /proc/sys/net/ipv6/conf/all/disable_ipv6 to be a (dirty) workaround. It just a side effect that it makes it work also for $AICCU_INTERFACE. Shouldn't the order of echo 0 > .../disable_ipv6 and ifconfig be changed instead? Just like in radvd. Could you please test the attached patch?

If it doesn't work then could you please try setting the value of /proc/sys/net/ipv6/conf/default/disable_ipv6 instead of .../all/disable_ipv6? According to this thread it might also help.

comment:17 Geändert vor 3 Monaten durch RomMon

Hi Gene,

Yes your patch is working.

( I'm a bit surprised/confused it does work because from my memories sixxs/disable_ipv6 needed to be 0 before starting aiccu.

Suspect timing is essential here, and your patch makes it just right (??).
e.g.

/mod/external/usr/sbin/aiccu start /var/media/ftp/uStor00/aiccu.conf
sleep 2
echo 0 2>/dev/null >/proc/sys/net/ipv6/conf/sixxs/disable_ipv6
ip addr show sixxs

doesn't work


/mod/external/usr/sbin/aiccu start /var/media/ftp/uStor00/aiccu.conf
cat /proc/sys/net/ipv6/conf/sixxs/disable_ipv6
echo 0 2>/dev/null >/proc/sys/net/ipv6/conf/sixxs/disable_ipv6
cat /proc/sys/net/ipv6/conf/sixxs/disable_ipv6
sleep 2
ip addr show sixxs

does work )

comment:18 Geändert vor 3 Monaten durch er13

You're most likely right about the timing issue (i.e. my code works just by incident). I missed that ifconfig is called without up/down parameter (while comparing the code to that of radvd). The while-loop is actually "wait until the interface is available".

I assume, /proc/sys/net/ipv6/conf/${AICCU_INTERFACE}/... doesn't exist before aiccu start, it is first created by the daemon. So setting the value before is not possible. I see the following possible solutions:

  1. Use exactly the same solution as in radvd, i.e. wait until the interface is available, check the value of disable_ipv6, if it's not equal to 0, immediately "ifconfig the interface down", set the value to 0, and "ifconfig the interface up".
  1. Or, save the value of /proc/sys/net/ipv6/conf/default/disable_ipv6 (note default, not all) before aiccu-daemon start, change it to 0, start daemon, wait until the interface is up, restore the saved value of /proc/sys/net/ipv6/conf/default/disable_ipv6

comment:19 Geändert vor 3 Monaten durch er13

@RomMon: could you please the attached patch, it implements the alternative 2. I consider it to be a faster one as it avoids setting the interface down/up.

comment:20 Antwort: Geändert vor 3 Monaten durch RomMon

Your new patch works great!

Indeed the interface sixxs doesn't exist before aiccu starts.

comment:21 Geändert vor 3 Monaten durch er13

  • Lösung auf fixed gesetzt
  • Status von new nach closed geändert
  • Verantwortlicher auf er13 gesetzt

In 14169:

aiccu:

comment:22 als Antwort auf: ↑ 20 Geändert vor 3 Monaten durch er13

Replying to RomMon:

Your new patch works great!

Thank you for testing!

Hinweis: Hilfe zur Verwendung von Tickets finden Sie in TracTickets.