[radvd-devel-l] radvd 1.0 issue with non-RUNNING interfaces
pekkas at netcore.fi
Wed Oct 24 08:58:54 EDT 2007
I'm copying the radvd devel list because I'd like more input on this.
On Sat, 29 Sep 2007, Simon wrote:
> I have attached the file I modified as I don't quite know how to get the
> correct diff.
> I am still looking at why the interface is running
> [From an earlier email:]
> The scenario is as follows :-
>1. Configure the IPV6 interface and radvd as appropriate to run on
> that interface.
>2. Have radvd chkconfig'd to start on boot
>3. Do not have the network cable plugged into the interface
>4. Reboot the machine, when the OS boots the interface it cannot
> assign a link local address, so it will be up but not running.
>5. radvd will exit because (call the ABORT) because it cannot find a
> link local address.
I did some testing on this and it appears that Linux kernel behaviour
has changed within the last 1-2 years or so (e.g., on RHL73, when an
interface didn't have RUNNING flag, it would still have link-local
address). The probable reason for this change is that if a particular
interface supports notification whether link is up or down, this kind
of action is reasonable.
I can think of two scenarios where this approach could fail:
- if an interface is not able to detect whether link is up or not.
(I'm not sure if all the relevant interface drivers support this.
Feedback is welcome on this.)
- on an old kernel, in a setup which would have worked earlier,
(with cable plugged off but interface has link-local addresses)
it no longer works unless IgnoreIfMissing is not enabled.
In the essence, the patch would require that interface is in RUNNING
state, instead of only checking whether a link-local address exists,
before starting up. This check can be skipped with 'IgnoreIfMissing
If anyone knows in more detail about interface drivers which don't
report "RUNNING" flag, please let me know. I'd like to avoid breaking
even the older setups. Otherwise I'd be inclined to merge this patch.
Pekka Savola "You each name yourselves king, yet the
Netcore Oy kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings
-------------- next part --------------
--- device-common.c 2007-10-24 15:38:59.000000000 +0300
+++ ../device-common.c 2007-10-24 15:17:38.000000000 +0300
@@ -22,7 +22,7 @@
check_device(int sock, struct Interface *iface)
struct ifreq ifr;
strncpy(ifr.ifr_name, iface->Name, IFNAMSIZ-1);
ifr.ifr_name[IFNAMSIZ-1] = '\0';
@@ -40,6 +40,12 @@
flog(LOG_ERR, "interface %s is not UP", iface->Name);
+ if (!(ifr.ifr_flags & IFF_RUNNING))
+ if (!iface->IgnoreIfMissing)
+ flog(LOG_ERR, "interface %s is not RUNNING", iface->Name);
+ return (-1);
if (! iface->UnicastOnly && !(ifr.ifr_flags & IFF_MULTICAST))
More information about the radvd-devel-l