diff options
author | Matthew Smith <mgsmith@netgate.com> | 2021-10-04 15:19:44 -0500 |
---|---|---|
committer | Neale Ranns <neale@graphiant.com> | 2021-10-13 07:17:54 +0000 |
commit | ac4e61205dcf365396ca44941ad055c7bd88c631 (patch) | |
tree | fb46d814aefbdca434a2e86433f97668e9d8c9b5 /LICENSE | |
parent | b5dec932b78c662134bc3c93cc23a355918e1632 (diff) |
interface: handle error during admin-up correctly
Type: fix
In vnet_sw_interface_set_flags_helper(), the variable old_flags is set
to the original value of vnet_sw_interface_t.flags for an interface. If
an error occurs during the process of bringing an interface up, old_flags
is used to restore the original value.
Before the dev class or hw class admin_up_down_function can be called,
but after modifying vnet_sw_interface_t.flags to it's new value,
old_flags is set to the value of vnet_sw_interface_t.flags a second time.
This discards the original flags that were being preserved.
As a result, if an interface is being brought up and the dev class
or hw class function fails, at the end VPP believes that interface is up.
This can cause a crash if packets are routed through the interface
and some RX/TX initialization was not completed because of the error
while bringing the interface up.
Change-Id: Ica6b6bac13c24e88c4136bf084cd392e6217e7d9
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions