Skip to content
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

bgpd: fix import from a local VRF with no bgp retain #14400

Merged
merged 3 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
topotests: check route import in bgp_vpnv4_noretain
Check route import in bgp_vpnv4_noretain

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
  • Loading branch information
louis-6wind committed Sep 12, 2023
commit 7acdaff7e2d9d51c5475e04a71d23f14bfd1d532
156 changes: 156 additions & 0 deletions tests/topotests/bgp_vpnv4_noretain/r1/ipv4_vrf_all_routes_init.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
{
"default": {
"vrfName": "default",
"routerId": "192.0.2.1",
"defaultLocPrf": 100,
"localAS": 65500,
"routes": {
"10.204.0.0/24": [
{
"pathFrom": "external",
"prefix": "10.204.0.0",
"prefixLen": 24,
"network": "10.204.0.0/24",
"metric": 0,
"locPrf": 100,
"weight": 0,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"announceNexthopSelf": true,
"nhVrfName": "default",
"nexthops": [
{
"ip": "10.125.0.2",
"hostname": "r1",
"afi": "ipv4",
"used": true
}
]
}
]
}
},
"vrf1": {
"vrfName": "vrf1",
"routerId": "192.0.2.1",
"defaultLocPrf": 100,
"localAS": 65500,
"routes": {
"10.101.0.0/24": [
{
"valid": true,
"bestpath": true,
"selectionReason": "First path received",
"pathFrom": "external",
"prefix": "10.101.0.0",
"prefixLen": 24,
"network": "10.101.0.0/24",
"metric": 0,
"weight": 32768,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"nexthops": [
{
"ip": "0.0.0.0",
"hostname": "r1",
"afi": "ipv4",
"used": true
}
]
}
],
"10.201.0.0/24": [
{
"pathFrom": "external",
"prefix": "10.201.0.0",
"prefixLen": 24,
"network": "10.201.0.0/24",
"metric": 0,
"locPrf": 100,
"weight": 0,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"announceNexthopSelf": true,
"nhVrfName": "default",
"nexthops": [
{
"ip": "10.125.0.2",
"hostname": "r1",
"afi": "ipv4",
"used": true
}
]
}
]
}
},
"vrf3": {
"vrfName": "vrf3",
"routerId": "192.0.2.1",
"defaultLocPrf": 100,
"localAS": 65500,
"routes": {
"10.103.0.0/24": [
{
"valid": true,
"bestpath": true,
"selectionReason": "First path received",
"pathFrom": "external",
"prefix": "10.103.0.0",
"prefixLen": 24,
"network": "10.103.0.0/24",
"metric": 0,
"weight": 32768,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"nexthops": [
{
"ip": "0.0.0.0",
"hostname": "r1",
"afi": "ipv4",
"used": true
}
]
}
]
}
},
"vrf4": {
"vrfName": "vrf4",
"routerId": "192.0.2.1",
"defaultLocPrf": 100,
"localAS": 65500,
"routes": {
"10.103.0.0/24": [
{
"valid": true,
"bestpath": true,
"selectionReason": "First path received",
"pathFrom": "external",
"prefix": "10.103.0.0",
"prefixLen": 24,
"network": "10.103.0.0/24",
"metric": 0,
"weight": 32768,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"announceNexthopSelf": true,
"nhVrfName": "vrf3",
"nexthops": [
{
"ip": "0.0.0.0",
"hostname": "r1",
"afi": "ipv4",
"used": true
}
]
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
{
"default": {
"vrfName": "default",
"routerId": "192.0.2.1",
"defaultLocPrf": 100,
"localAS": 65500,
"routes": {
"10.204.0.0/24": [
{
"pathFrom": "external",
"prefix": "10.204.0.0",
"prefixLen": 24,
"network": "10.204.0.0/24",
"metric": 0,
"locPrf": 100,
"weight": 0,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"announceNexthopSelf": true,
"nhVrfName": "default",
"nexthops": [
{
"ip": "10.125.0.2",
"hostname": "r1",
"afi": "ipv4",
"used": true
}
]
}
]
}
},
"vrf1": {
"vrfName": "vrf1",
"routerId": "192.0.2.1",
"defaultLocPrf": 100,
"localAS": 65500,
"routes": {
"10.101.0.0/24": [
{
"valid": true,
"bestpath": true,
"selectionReason": "First path received",
"pathFrom": "external",
"prefix": "10.101.0.0",
"prefixLen": 24,
"network": "10.101.0.0/24",
"metric": 0,
"weight": 32768,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"nexthops": [
{
"ip": "0.0.0.0",
"hostname": "r1",
"afi": "ipv4",
"used": true
}
]
}
],
"10.201.0.0/24": [
{
"pathFrom": "external",
"prefix": "10.201.0.0",
"prefixLen": 24,
"network": "10.201.0.0/24",
"metric": 0,
"locPrf": 100,
"weight": 0,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"announceNexthopSelf": true,
"nhVrfName": "default",
"nexthops": [
{
"ip": "10.125.0.2",
"hostname": "r1",
"afi": "ipv4",
"used": true
}
]
}
]
}
},
"vrf3": {
"vrfName": "vrf3",
"routerId": "192.0.2.1",
"defaultLocPrf": 100,
"localAS": 65500,
"routes": {
"10.103.0.0/24": [
{
"valid": true,
"bestpath": true,
"selectionReason": "First path received",
"pathFrom": "external",
"prefix": "10.103.0.0",
"prefixLen": 24,
"network": "10.103.0.0/24",
"metric": 0,
"weight": 32768,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"nexthops": [
{
"ip": "0.0.0.0",
"hostname": "r1",
"afi": "ipv4",
"used": true
}
]
}
]
}
},
"vrf4": {
"vrfName": "vrf4",
"routerId": "192.0.2.1",
"defaultLocPrf": 100,
"localAS": 65500,
"routes": {
"10.103.0.0/24": [
{
"valid": true,
"bestpath": true,
"selectionReason": "First path received",
"pathFrom": "external",
"prefix": "10.103.0.0",
"prefixLen": 24,
"network": "10.103.0.0/24",
"metric": 0,
"weight": 32768,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"announceNexthopSelf": true,
"nhVrfName": "vrf3",
"nexthops": [
{
"ip": "0.0.0.0",
"hostname": "r1",
"afi": "ipv4",
"used": true
}
]
}
]
}
},
"vrf2": {
"vrfName": "vrf2",
"routerId": "192.0.2.1",
"defaultLocPrf": 100,
"localAS": 65500,
"routes": {
"10.101.0.0/24": [
{
"valid": true,
"bestpath": true,
"selectionReason": "First path received",
"pathFrom": "external",
"prefix": "10.101.0.0",
"prefixLen": 24,
"network": "10.101.0.0/24",
"metric": 0,
"weight": 32768,
"peerId": "(unspec)",
"path": "",
"origin": "incomplete",
"announceNexthopSelf": true,
"nhVrfName": "vrf1",
"nexthops": [
{
"ip": "0.0.0.0",
"hostname": "r1",
"afi": "ipv4",
"used": true
}
]
}
]
}
}
}
Loading