Closed stspdotname closed 1 year ago
I don't have a problem with this, but i'm a little surprised. Is this a bug in veb? Perhaps some condition is not met for vport to be up when SIOCSIFADDR happens?
Leaving vport/veb down when an address is configured was a deliberate choice by dlg@.
Closing Pull Request suggested... by stefan
I think this should be re-opened and merged. Without this vport cannot be used by nsh users without explicit use of 'no shutdown'.
Re Opened as requested by Stefan
Ahh, here's dlg's reply:
"My counter argument is that no interface should implicitly bring itself up when an address is configured because it has been a road block to figuring out how to lock the ioctl paths better, and it confuses error handling. If address config works, but the interface fails to come up, the address remains configured but we report an error. But it looks like configuring an address failed? Wat."
I can't say he's wrong, I can only say that we need consistency.
To finish my last post, doing this is more consistent than going along with vport's reset of the UP flag.
Since 'shutdown' state isn't consistent among all interfaces, nsh assumes that ports with an IP address set are already UP. vport breaks this assumption and nsh would not work consistently in its current state with vport. A 'no shutdown' will not be printed by nsh because it already has an IP address set.
Forcing UP is the best solution until dlg pushes through system-wide IFF_UP changes on SIOCSIFADDR, or until some other uniform policy is reached.
Needed for vport(4) interfaces which stay down by default.