Commit 5d74f1b
ctlplane: only mirror valid MTU or MAC values
When creating an interface, its MTU or MAC may still be undetermined
because it hasn't finished its initialization.
For instance, when creating a new port, since commit 05f811a
("iface: make sure to deallocate resources on init failure"),
GR_EVENT_IFACE_ADD is triggered *before* calling iface_set_mtu() which
resolves the mtu field value.
Since the creation of the control plane linux tap interface is triggered
by GR_EVENT_IFACE_ADD, cp_update calls netlink_link_set_mtu(ifindex, 0)
which causes this error log:
ERR: GROUT: cp_update: netlink_link_set_mtu: Invalid argument
Make sure to only mirror the MTU and MAC address to linux when we have
determined values.
Fixes: 05f811a ("iface: make sure to deallocate resources on init failure")
Signed-off-by: Robin Jarry <rjarry@redhat.com>
Reviewed-by: Christophe Fontaine <cfontain@redhat.com>1 parent 2aa2ad6 commit 5d74f1b
1 file changed
+16
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
392 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
393 | 399 | | |
394 | | - | |
395 | | - | |
396 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
397 | 408 | | |
398 | 409 | | |
399 | 410 | | |
| |||
0 commit comments