#517526 radvd: Radvd should not fail when IPv6 forwarding is disabled

Package:
radvd
Source:
radvd
Description:
Router Advertisement Daemon
Submitter:
Guus Sliepen
Date:
2010-09-18 01:48:03 UTC
Severity:
normal
#517526#5
Date:
2009-02-28 11:59:34 UTC
From:
To:
Both the init script and the radvd check if forwading is enabled by reading
/proc/sys/net/ipv6/conf/all/forwarding, and exit when it is not enabled.
However, radvd itself does not depend on forwarding, it only advertises routes.
There can be scenarios when people want to advertise prefixes but do not want
forwarding to happen at all, or perhaps they run radvd on another host instead
of the router itself. Also, in the interest of security one might want to
prevent a race condition by having forwarding disabled until very late in the
boot process when all the firewall/ACL/etc stuff has been set up. Please remove
these checks or replace them with a warning.

#517526#10
Date:
2009-08-04 17:59:36 UTC
From:
To:
Yeah, lately I've had trouble because the initscript that turns on
IPv6 routing (among other things) doesn't get run before radvd's
initscript ...
radvd should at least be a bit more patient about waiting for routing
to be enabled!

#517526#15
Date:
2010-09-18 00:44:49 UTC
From:
To:
On a system I control, I have:

  # (cd /proc/sys/net/ipv6/conf && grep . {eth*,default,all}/forwarding)
  eth0/forwarding:0
  eth1/forwarding:1
  eth2/forwarding:1
  default/forwarding:1
  all/forwarding:0

Some of the interfaces forward and some do not.  I wish to use radvd
only on some interfaces, and those happen to forward.

But guess what, it still doesn't start!  Even removing the initscript
check doesn't help, because the radvd binary itself vomits profusely
at the idea that forwarding is not enabled for _all_ interfaces:

  (from strace)
  open("/proc/sys/net/ipv6/conf/all/forwarding", O_RDONLY) = 5
  fstat64(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
  mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = <redacted>
  read(5, "0\n"..., 1024)     = 2
  close(5)                    = 0
  [...]

  (stderr output)
  [Sep 17 17:41:37] radvd: IPv6 forwarding seems to be disabled, exiting