diff options
| author | anlan_cs <vic.lan@pica8.com> | 2022-03-04 21:52:27 +0800 | 
|---|---|---|
| committer | anlan_cs <anlan_cs@tom.com> | 2023-10-07 10:06:39 +0800 | 
| commit | b580c52698287c24e41b6c5b190c2ddddc336f4c (patch) | |
| tree | 34f270ed0e4bc62a5ae7724f3dd07d3b91bec608 /lib/zclient.h | |
| parent | d6a9c7ec8776c6d937bc51c3cd4df1c1f59b5c58 (diff) | |
*: remove ZEBRA_INTERFACE_VRF_UPDATE
Currently when one interface changes its VRF, zebra will send these messages to
all daemons in *order*:
    1) `ZEBRA_INTERFACE_DELETE` ( notify them delete from old VRF )
    2) `ZEBRA_INTERFACE_VRF_UPDATE` ( notify them move from old to new VRF )
    3) `ZEBRA_INTERFACE_ADD` ( notify them added into new VRF )
When daemons deal with `VRF_UPDATE`, they use
`zebra_interface_vrf_update_read()->if_lookup_by_name()`
to check the interface exist or not in old VRF. This check will always return
*NULL* because `DELETE` ( deleted from old VRF ) is already done, so can't
find this interface in old VRF.
Send `VRF_UPDATE` is redundant and unuseful. `DELETE` and `ADD` are enough,
they will deal with RB tree, so don't send this `VRF_UPDATE` message when
vrf changes.
Since all daemons have good mechanism to deal with changing vrf, and don't
use this `VRF_UPDATE` mechanism.  So, it is safe to completely remove
all the code with `VRF_UPDATE`.
Signed-off-by: anlan_cs <anlan_cs@tom.com>
Diffstat (limited to 'lib/zclient.h')
| -rw-r--r-- | lib/zclient.h | 1 | 
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/zclient.h b/lib/zclient.h index 2a3ce4e488..f18fc056fc 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -127,7 +127,6 @@ typedef enum {  	ZEBRA_VRF_ADD,  	ZEBRA_VRF_DELETE,  	ZEBRA_VRF_LABEL, -	ZEBRA_INTERFACE_VRF_UPDATE,  	ZEBRA_BFD_CLIENT_REGISTER,  	ZEBRA_BFD_CLIENT_DEREGISTER,  	ZEBRA_INTERFACE_ENABLE_RADV,  | 
