-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zebra: Fix missing VRF flag #13403
zebra: Fix missing VRF flag #13403
Conversation
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests debian 10 amd64 part 7: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO7DEB10AMD64-11182/test Topology Tests failed for Topotests debian 10 amd64 part 7 Topotests debian 10 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6DEB10AMD64-11182/test Topology Tests failed for Topotests debian 10 amd64 part 6 Successful on other platforms/tests
|
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 i386 part 3: Failed (click for details)Topotests Ubuntu 18.04 i386 part 3: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11189/artifact/TOPO3U18I386/TopotestDetails/Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO3U18I386-11189/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 3 Topotests debian 10 amd64 part 9: Failed (click for details)Topotests debian 10 amd64 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11189/artifact/TOPO9DEB10AMD64/TopotestLogs/ Topotests debian 10 amd64 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11189/artifact/TOPO9DEB10AMD64/TopotestDetails/ Topotests debian 10 amd64 part 9: No useful log foundSuccessful on other platforms/tests
|
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topotests Ubuntu 18.04 i386 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11206/artifact/TOPO9U18I386/TopotestLogs/ Topotests Ubuntu 18.04 i386 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11206/artifact/TOPO9U18I386/TopotestDetails/ Topotests Ubuntu 18.04 i386 part 9: No useful log foundSuccessful on other platforms/tests
|
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 arm8 part 9: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11209/artifact/TOPO9U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 9: No useful log foundSuccessful on other platforms/tests
|
e6ecdbc
to
6c9cf5b
Compare
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 arm8 part 9: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11215/artifact/TOPO9U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 9: No useful log foundSuccessful on other platforms/tests
|
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 i386 part 7: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO7U18I386-11216/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 7 Successful on other platforms/tests
|
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 arm8 part 9: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11218/artifact/TOPO9U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 9: No useful log foundSuccessful on other platforms/tests
|
1. No any configuration in FRR, and `ip link add vrf1 type vrf ...`. Currently, everything is ok. 2. `ip link del vrf1`. `zebra` will wrongly/redundantly notify clients to add "vrf1" as a normal interface after correct deletion of "vrf1". ``` ZEBRA: [KMXEB-K771Y] netlink_parse_info: netlink-listen (NS 0) type RTM_DELLINK(17), len=588, seq=0, pid=0 ZEBRA: [TDJW2-B9KJW] RTM_DELLINK for vrf1(93) <- Wrongly as normal interface, not vrf ZEBRA: [WEEJX-M4HA0] interface vrf1 vrf vrf1(93) index 93 is now inactive. ZEBRA: [NXAHW-290AC] MESSAGE: ZEBRA_INTERFACE_DELETE vrf1 vrf vrf1(93) ZEBRA: [H97XA-ABB3A] MESSAGE: ZEBRA_INTERFACE_VRF_UPDATE/DEL vrf1 VRF Id 93 -> 0 ZEBRA: [HP8PZ-7D6D2] MESSAGE: ZEBRA_INTERFACE_VRF_UPDATE/ADD vrf1 VRF Id 93 -> 0 <- ZEBRA: [Y6R2N-EF2N4] interface vrf1 is being deleted from the system ZEBRA: [KNFMR-AFZ53] RTM_DELLINK for VRF vrf1(93) ZEBRA: [P0CZ5-RF5FH] VRF vrf1 id 93 is now inactive ZEBRA: [XC3P3-1DG4D] MESSAGE: ZEBRA_VRF_DELETE vrf1 ZEBRA: [ZMS2F-6K837] VRF vrf1 id 4294967295 deleted OSPF: [JKWE3-97M3J] Zebra: interface add vrf1 vrf default[0] index 0 flags 480 metric 0 mtu 65575 speed 0 <- Wrongly add interface ``` `if_handle_vrf_change()` moved the interface from specific vrf to default vrf. But it doesn't skip interface of vrf type. So, the wrong/redundant add operation is done. Note, the wrong add operation is regarded as an normal interface because the `ifp->status` is cleared too early, so it is without VRF flag ( `ZEBRA_INTERFACE_VRF_LOOPBACK` ). Now, ospfd will initialize `ifp->type` to `OSPF_IFTYPE_BROADCAST`. 3. `ip link add vrf1 type vrf ...`, add "vrf1" again. FRR will be with wrong display: ``` interface vrf1 ip ospf network broadcast exit ``` Here, zebra will send `ZEBRA_INTERFACE_ADD` again for "vrf1" with correct `ifp->status`, so it will be updated into vrf type. But it can't update `ifp->type` from `OSPF_IFTYPE_BROADCAST` to `OSPF_IFTYPE_LOOPBACK` because it had been already configured in above step 2. Two changes to fix it: 1. Skip the procedure of switching VRF for interfaces of vrf type. It means, don't send `ZEBRA_INTERFACE_ADD` to clients when deleting vrf. 2. Put the deletion of this flag at the last. It means, clients should get correct `ifp->status`. Signed-off-by: anlan_cs <[email protected]>
6c9cf5b
to
4141450
Compare
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 arm8 part 9: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11220/artifact/TOPO9U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 9: No useful log foundTopotests debian 10 amd64 part 7: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO7DEB10AMD64-11220/test Topology Tests failed for Topotests debian 10 amd64 part 7 Topotests Ubuntu 18.04 i386 part 9: Failed (click for details)Topotests Ubuntu 18.04 i386 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11220/artifact/TOPO9U18I386/TopotestLogs/ Topotests Ubuntu 18.04 i386 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11220/artifact/TOPO9U18I386/TopotestDetails/ Topotests Ubuntu 18.04 i386 part 9: No useful log foundSuccessful on other platforms/tests
|
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedUbuntu 18.04 ppc64le build: Failed (click for details)Ubuntu 18.04 ppc64le build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11221/artifact/U1804PPC64LEBUILD/frr.xref.xz/frr.xref.xz Ubuntu 18.04 ppc64le build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11221/artifact/U1804PPC64LEBUILD/config.log/config.log.gz Ubuntu 18.04 ppc64le build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-PULLREQ2-11221/artifact/U1804PPC64LEBUILD/config.status/config.status Ubuntu 18.04 ppc64le build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11221/artifact/U1804PPC64LEBUILD/ErrorLog/ Ubuntu 18.04 ppc64le build: No useful log foundSuccessful on other platforms/tests
|
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 arm8 part 1: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 1: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11221/artifact/TOPO1U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 1: No useful log foundSuccessful on other platforms/tests
|
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-11221/ This is a comment from an automated CI system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
No any configuration in FRR, and
ip link add vrf1 type vrf ...
.Currently, everything is ok.
ip link del vrf1
.zebra
will wrongly/redundantly notify clients to add "vrf1" as a normalinterface after correct deletion of "vrf1".
if_handle_vrf_change()
moved the interface from specific vrf to defaultvrf. But it doesn't skip interface of vrf type. So, the wrong/redundant
add operation is done.
Note, the wrong add operation is regarded as an normal interface because
the
ifp->status
is cleared too early, so it is without VRF flag(
ZEBRA_INTERFACE_VRF_LOOPBACK
). Now, ospfd will initializeifp->type
to
OSPF_IFTYPE_BROADCAST
.ip link add vrf1 type vrf ...
, add "vrf1" again. FRR will be withwrong display:
Here, zebra will send
ZEBRA_INTERFACE_ADD
again for "vrf1" withcorrect
ifp->status
, so it will be updated into vrf type. Butit can't update
ifp->type
fromOSPF_IFTYPE_BROADCAST
toOSPF_IFTYPE_LOOPBACK
because it had been already configured in abovestep 2.
Two changes to fix it:
Skip the procedure of switching VRF for interfaces of vrf type.
It means, don't send
ZEBRA_INTERFACE_ADD
to clients when deleting vrf.Put the deletion of this flag at the last.
It means, clients should get correct
ifp->status
.It seems the 2nd change can be dropped/ignored after all other things work well with 1st change.