tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ifconfig not waiting for DAD completion



On Tuesday, at 16:06, Roy Marples wrote:
| On 2015-11-27 22:37, Anthony Mallet wrote:
| > The results are a bit surprising to me :
| >  - wm(4) still starts in the 'detached' state after becoming up.
| >  - `ifconfig -w` consequently does not wait at all.
|
| That is surprising.
| Attached is a new patch with one extra line to ensure sc_flags is set
| before calling the tick function, but I'm not sure if that will help
| any.
|
| Let me know!

No, this does not help.

From what I can observe, it takes 2-3 seconds for the interface to realise that
it has a link. So it makes sense that calling wm_tick() one second earlier or
later does not help.

| We could also try calling the tick function a second time in wm_init to
| see if it just needed to be tickled.

I tried that (calling wm_tick() twice), but this did not help either.

| Yes, maybe ifconfig -w *should* do something.
| I was trying to avoid waiting for interfaces that really have no carrier
| (ie a cable plugged in), but as you point out we don't want the test to
| pass if it takes a few seconds for the interface to realise it has a
| carrier. This is doubly true for wireless and I don't know how a host AP
| interface would behave here.
|
| Does anyone have any thoughts on if -w should wait for detached as well,
| or if we should roll that into a new flag (maybe -W)? And on how to
| choose which one in rc.d/network?

If ifconfig -w is to wait for detached as well, maybe it could take an
interface name (like -s), e.g. `ifconfig -w 4 wm0` and a new variable added in
rc.conf, e.g. waitdad_interfaces="wm0 wm1". Or just waitdad=YES/NO and using
whatever is in net_interfaces or in the auto_ifconfig computed list.

Another approach could be `ifconfig wm0 ... waitdad 4` so that this can be
tuned in $ifconfig_xxN. But this looses the parallelism if one has several
interfaces.


Home | Main Index | Thread Index | Old Index