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

Fix/revert ipv4 mapped ipv6 stuff 10.1 #29

Open
wants to merge 126 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
07090cc
lib: fix incorrect use of error checking macro
choppsv1 Jun 12, 2024
212a75e
Merge pull request #16210 from LabNConsulting/chopps/fix-bug
Jafaral Jun 13, 2024
6d1023a
zebra: Prevent starvation in dplane_thread_loop
donaldsharp Jun 14, 2024
7749253
bgpd: fixed failing remove of vrf if there is a stale l3vni
kacpekwasny May 27, 2024
7bb66b8
bgpd: fix do not use api.backup_nexthop in ZAPI message
pguibert6WIND Jun 20, 2024
e33bdc0
zebra: fix evpn mh bond member proto reinstall
chiragshah6 Jun 19, 2024
1787c35
Merge pull request #16262 from FRRouting/mergify/bp/dev/10.1/pr-16260
ton31337 Jun 21, 2024
8ef8743
Merge pull request #16264 from FRRouting/mergify/bp/dev/10.1/pr-16252
ton31337 Jun 21, 2024
325c63c
Merge pull request #16255 from FRRouting/mergify/bp/dev/10.1/pr-16059
ton31337 Jun 21, 2024
348063b
bgpd: Set last reset reason to admin shutdown if it was manually
ton31337 Jun 19, 2024
dc98037
bgpd: Remove redundant whitespace before printing the reason of the f…
ton31337 Jun 19, 2024
9f1e1eb
bgpd: Check if we have really enough data before doing memcpy for sof…
ton31337 Jun 12, 2024
b98a3a1
bgpd: Check if we have really enough data before doing memcpy for FQD…
ton31337 Jun 13, 2024
3bc3674
zebra: clear evpn dup-addr return error-msg when there is no vni
Jun 19, 2024
c05a11d
bgpd: fix "bgp as-pah access-list" with "set aspath exclude" set/unse…
fdumontet6WIND Apr 23, 2024
1488b47
tests: improve tests for aspath exclude and bgp access list
fdumontet6WIND Apr 24, 2024
ecf1bc0
Merge pull request #16274 from FRRouting/mergify/bp/dev/10.1/pr-16242
Jafaral Jun 25, 2024
13460af
Merge pull request #16239 from FRRouting/mergify/bp/dev/10.1/pr-16224
ton31337 Jun 25, 2024
a83e597
Merge pull request #16278 from FRRouting/mergify/bp/dev/10.1/pr-16211
ton31337 Jun 25, 2024
48b0d33
Merge pull request #16281 from FRRouting/mergify/bp/dev/10.1/pr-16213
ton31337 Jun 25, 2024
26fd1f8
bgpd: Relax OAD (One-Administration-Domain) for RFC8212
ton31337 Jun 24, 2024
c105f9a
bgpd: Adjust the length of tunnel encap sub-tlv by sub-tlv type
ton31337 Jun 13, 2024
c01d60b
bgpd: Check if we have real stream data for tunnel encapsulation sub-…
ton31337 Jun 13, 2024
b43bf5a
Merge pull request #16289 from FRRouting/mergify/bp/dev/10.1/pr-16273
riw777 Jun 25, 2024
3745192
Merge pull request #16291 from FRRouting/mergify/bp/dev/10.1/pr-16214
riw777 Jun 25, 2024
67328b6
Merge pull request #16284 from FRRouting/mergify/bp/dev/10.1/pr-16261
ton31337 Jun 25, 2024
6ea0a93
Merge pull request #16285 from FRRouting/mergify/bp/dev/10.1/pr-15838
riw777 Jun 25, 2024
73b1821
bgpd: avoid clearing routes for peers that were never established
Jun 19, 2024
6d24756
Merge pull request #16302 from FRRouting/mergify/bp/dev/10.1/pr-16271
donaldsharp Jun 27, 2024
5bd66b6
bgpd: Ignore routes from evpn if VRF is unknown
piotrsuchy May 22, 2024
dd53197
Merge pull request #16306 from FRRouting/mergify/bp/dev/10.1/pr-16068
ton31337 Jun 30, 2024
8eb7d0a
bgpd: Ignore RFC8212 for BGP Confederations
ton31337 Jun 27, 2024
57dec1c
tests: Test if RFC 8212 is not involved for BGP confederations
ton31337 Jun 27, 2024
46eb2c3
ripd: Change the start value of sequence 1 to 0
T-Nicolas Jun 17, 2024
9221e2c
Merge pull request #16318 from FRRouting/mergify/bp/dev/10.1/pr-16233
riw777 Jul 2, 2024
7da20b3
Merge pull request #16312 from FRRouting/mergify/bp/dev/10.1/pr-16305
riw777 Jul 2, 2024
12e24ca
isisd: fix crash when obtaining the next hop to calculate LFA on LAN …
zhou-run Jun 27, 2024
6b7c9f0
ldpd: fix wrong gtsm count
anlancs Jun 15, 2024
8295bdb
Merge pull request #16328 from FRRouting/mergify/bp/dev/10.1/pr-16303
Jafaral Jul 2, 2024
641ebd9
Merge pull request #16335 from FRRouting/mergify/bp/dev/10.1/pr-16226
donaldsharp Jul 3, 2024
7ac9e7f
tests: tweak timers to avoid frequent failures on slow CI hardware
Jafaral Jul 10, 2024
09bfdc3
zebra: Fix to avoid two Vrfs with same table ids
raja-rajasekar Jul 5, 2024
c09f1ae
Merge pull request #16378 from FRRouting/mergify/bp/dev/10.1/pr-16363
Jafaral Jul 15, 2024
11812ec
zebra: fix missing static routes
anlancs Jul 12, 2024
ed27242
Merge pull request #16387 from FRRouting/mergify/bp/dev/10.1/pr-16373
mjstapp Jul 16, 2024
f727c63
isisd: fix crash when calculating the neighbor spanning tree based on…
zhou-run Jul 11, 2024
6c573ce
bgpd: Mark VRF instance as auto created if import vrf is configured f…
ton31337 Jul 12, 2024
906711c
tests: Check if multiple VRF instances can have different ASNs
ton31337 Jul 13, 2024
b5db1e7
bgpd: Skip automatically created BGP instances for show CMDs
ton31337 Jul 13, 2024
19a0e3d
tests: Check if VRF instance has a different ASN than a default VRF
ton31337 Jul 13, 2024
2ab249e
bgpd: Skip empty (auto created) VRF instances when deleting a default…
ton31337 Jul 15, 2024
9f9c0bc
bgpd: backpressure - fix to properly remove dest for bgp under deletion
raja-rajasekar Jul 10, 2024
25d515c
bgpd: backpressure - Improve debuggability
raja-rajasekar Jul 11, 2024
2295328
Merge pull request #16395 from FRRouting/mergify/bp/dev/10.1/pr-16365
ton31337 Jul 16, 2024
e014a46
Merge pull request #16379 from FRRouting/mergify/bp/dev/10.1/pr-16350
ton31337 Jul 16, 2024
b139113
Merge pull request #16399 from FRRouting/mergify/bp/dev/10.1/pr-16374
Jafaral Jul 17, 2024
2a06d1c
Merge pull request #16404 from FRRouting/mergify/bp/dev/10.1/pr-16368
ton31337 Jul 17, 2024
f1e664f
lib: move non-error from __log_err to __dbg
choppsv1 Jul 22, 2024
4e652de
pimd: fix crash on non-existent interface
louis-6wind Jun 28, 2024
edbd0af
Merge pull request #16430 from FRRouting/mergify/bp/dev/10.1/pr-16429
Jafaral Jul 22, 2024
743eecd
Merge pull request #16433 from FRRouting/mergify/bp/dev/10.1/pr-16309
donaldsharp Jul 23, 2024
4c68489
bgpd: backpressure - Avoid use after free
raja-rajasekar Jul 22, 2024
ef873b1
zebra: Properly note that a nhg's nexthop has gone down
donaldsharp Feb 7, 2024
f34dfab
ospfd: fix internal ldp-sync state flags when feature is disabled
c-po Jul 13, 2024
5bc6621
Merge pull request #16441 from FRRouting/mergify/bp/dev/10.1/pr-16437
ton31337 Jul 23, 2024
d9ca4b8
Merge pull request #16443 from FRRouting/mergify/bp/dev/10.1/pr-16376
riw777 Jul 23, 2024
bf7eb3f
Merge pull request #16442 from FRRouting/mergify/bp/dev/10.1/pr-16330
Jafaral Jul 24, 2024
d4c307d
yang: Added missed prefix to the yang file
y-bharath14 Jul 22, 2024
066854e
Merge pull request #16453 from FRRouting/mergify/bp/dev/10.1/pr-16428
donaldsharp Jul 24, 2024
609a84f
lib: mgmtd: fix too early daemon detach of mgmtd
choppsv1 Jul 23, 2024
c717390
Merge pull request #16458 from FRRouting/mergify/bp/dev/10.1/pr-16451
ton31337 Jul 25, 2024
b239c90
pimd: Fix msdp setting of sa->rp
donaldsharp Jul 25, 2024
f9a9d42
bgpd: backpressure - fix ret value evpn_route_select_install
raja-rajasekar Jul 17, 2024
d4e8279
bgpd: backpressure - log error for evpn when route install to zebra f…
raja-rajasekar Jul 19, 2024
36a70b5
bgpd: backpressure - fix evpn route sync to zebra
chiragshah6 Jun 17, 2024
04d00cd
Merge pull request #16476 from FRRouting/mergify/bp/dev/10.1/pr-16472
donaldsharp Jul 26, 2024
5679321
Merge pull request #16479 from opensourcerouting/fix/backpressue_10.1
donaldsharp Jul 26, 2024
6485e39
bgpd: Do not process VRF import/export to/from auto created VRF insta…
ton31337 Jul 28, 2024
78c5d1d
Merge pull request #16493 from FRRouting/mergify/bp/stable/10.1/pr-16491
donaldsharp Jul 29, 2024
b291690
bgpd: Check the actual remaining stream length before taking TLV value
ton31337 Jul 31, 2024
4b666e0
Merge pull request #16502 from FRRouting/mergify/bp/stable/10.1/pr-16497
donaldsharp Jul 31, 2024
588b8fe
debian, redhat: updating changelog for 10.1 release
Jafaral Aug 1, 2024
14c29f8
FRR Release 10.1
Jafaral Aug 1, 2024
6c5c46f
lib: fix crash on distribute-list delete
idryzhov Aug 7, 2024
4541aba
Merge pull request #16536 from FRRouting/mergify/bp/stable/10.1/pr-16530
donaldsharp Aug 8, 2024
d2e2d69
ripd: fix show run output for distribute-list
idryzhov Aug 7, 2024
0cb3342
Merge pull request #16540 from FRRouting/mergify/bp/stable/10.1/pr-16531
donaldsharp Aug 9, 2024
06bf5bc
mgmtd: don't add implicit state data when reading config from file
idryzhov Aug 7, 2024
3d5f117
Merge pull request #16552 from FRRouting/mergify/bp/stable/10.1/pr-16529
donaldsharp Aug 10, 2024
a0bcf64
zebra: Ensure non-equal id's are not same nhg's
donaldsharp Aug 10, 2024
c1ee987
isisd: fix memory handling in isis_adj_process_threeway()
Aug 9, 2024
c3cc4b4
lib: fix distribute-list deletion
idryzhov Aug 9, 2024
2ce84fb
Merge pull request #16568 from FRRouting/mergify/bp/stable/10.1/pr-16551
donaldsharp Aug 13, 2024
0385a87
Merge pull request #16564 from FRRouting/mergify/bp/stable/10.1/pr-16545
donaldsharp Aug 13, 2024
ed6953a
Merge pull request #16560 from FRRouting/mergify/bp/stable/10.1/pr-16554
donaldsharp Aug 13, 2024
88c6471
Revert "bgpd: fix sending ipv6 local nexthop if global present"
ton31337 Aug 14, 2024
e85077c
Revert "bgpd: log new ipv6 global in bgp_interface_address_add"
ton31337 Aug 14, 2024
0a7e971
Revert "bgpd: reduce bgp_interface_address_add indentation"
ton31337 Aug 14, 2024
8a7c4c0
Revert "bgpd: optimize bgp_interface_address_add"
ton31337 Aug 14, 2024
efd8f61
Revert "topotests: update bgp_vrf_leaking_5549_routes"
ton31337 Aug 14, 2024
863da18
Revert "bgpd: prefer link-local to a ipv4-mapped ipv6 global"
ton31337 Aug 14, 2024
8dffec1
Revert "bgpd: set ipv4-mapped ipv6 for ipv4 with ipv6 nexthop"
ton31337 Aug 14, 2024
9a5c3b9
Revert "tests: ipv6 global removal in bgp_nexthop_mp_ipv4_6"
ton31337 Aug 14, 2024
3e7094e
Revert "bgpd: fix "used" json key on link-local nexthop"
ton31337 Aug 14, 2024
2fd44b1
Revert "bgpd: fix removing ipv6 global nexhop"
ton31337 Aug 14, 2024
72b4ca5
Revert "bgpd: optimize bgp_interface_address_del"
ton31337 Aug 14, 2024
9e3aa8c
Revert "topotests: add bgp_nexthop_mp_ipv4_6 test"
ton31337 Aug 14, 2024
fd66383
bgpd: fix memory type for static->prd_pretty
pguibert6WIND Aug 14, 2024
1568dc3
Merge pull request #16591 from FRRouting/mergify/bp/stable/10.1/pr-16585
donaldsharp Aug 15, 2024
db12dcc
Merge remote-tracking branch 'refs/remotes/origin/master' into fix/re…
RodrigoMNardi Aug 15, 2024
91a0edb
doc: bgp_vty fixing default name
RodrigoMNardi Aug 15, 2024
e5030e5
doc: bgp_vty fixing default name
RodrigoMNardi Aug 15, 2024
66c9bb3
Revert "bgpd: fix sending ipv6 local nexthop if global present"
ton31337 Aug 14, 2024
2910840
Revert "bgpd: log new ipv6 global in bgp_interface_address_add"
ton31337 Aug 14, 2024
64d6da5
Revert "bgpd: reduce bgp_interface_address_add indentation"
ton31337 Aug 14, 2024
de1d794
Revert "bgpd: optimize bgp_interface_address_add"
ton31337 Aug 14, 2024
d10419e
Revert "topotests: update bgp_vrf_leaking_5549_routes"
ton31337 Aug 14, 2024
4e2d8db
Revert "bgpd: prefer link-local to a ipv4-mapped ipv6 global"
ton31337 Aug 14, 2024
8beb5c4
Revert "bgpd: set ipv4-mapped ipv6 for ipv4 with ipv6 nexthop"
ton31337 Aug 14, 2024
163a65d
Revert "tests: ipv6 global removal in bgp_nexthop_mp_ipv4_6"
ton31337 Aug 14, 2024
572b1c2
Revert "bgpd: fix "used" json key on link-local nexthop"
ton31337 Aug 14, 2024
63094de
Revert "bgpd: fix removing ipv6 global nexhop"
ton31337 Aug 14, 2024
8b537e0
Revert "bgpd: optimize bgp_interface_address_del"
ton31337 Aug 14, 2024
0b550c4
Revert "topotests: add bgp_nexthop_mp_ipv4_6 test"
ton31337 Aug 14, 2024
1755df9
Merge remote-tracking branch 'origin/fix/revert_ipv4_mapped_ipv6_stuf…
RodrigoMNardi Aug 16, 2024
3063083
Merge remote-tracking branch 'origin/master' into fix/revert_ipv4_map…
RodrigoMNardi Aug 16, 2024
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
60 changes: 26 additions & 34 deletions bgpd/bgp_nht.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop,
afi = BGP_ATTR_MP_NEXTHOP_LEN_IP6(pi->attr) ? AFI_IP6
: AFI_IP;

/* Validation for the ipv4 mapped ipv6 nexthop. */
if (IS_MAPPED_IPV6(&pi->attr->mp_nexthop_global)) {
afi = AFI_IP;
}

/* This will return true if the global IPv6 NH is a link local
* addr */
if (make_prefix(afi, pi, &p) < 0)
Expand Down Expand Up @@ -351,9 +356,7 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop,
}
return 0;
}
if (afi == AFI_IP6 && p.family == AF_INET)
/* IPv4 mapped IPv6 nexthop address */
afi = AFI_IP;

srte_color = bgp_attr_get_color(pi->attr);

} else if (peer) {
Expand Down Expand Up @@ -1037,11 +1040,19 @@ static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p)
p->u.prefix4 = p_orig->u.prefix4;
p->prefixlen = p_orig->prefixlen;
} else {
if (p_orig->family == AF_EVPN)
p->u.prefix4 = pi->attr->mp_nexthop_global_in;
else
p->u.prefix4 = pi->attr->nexthop;
p->prefixlen = IPV4_MAX_BITLEN;
if (IS_MAPPED_IPV6(&pi->attr->mp_nexthop_global)) {
ipv4_mapped_ipv6_to_ipv4(
&pi->attr->mp_nexthop_global, &ipv4);
p->u.prefix4 = ipv4;
p->prefixlen = IPV4_MAX_BITLEN;
} else {
if (p_orig->family == AF_EVPN)
p->u.prefix4 =
pi->attr->mp_nexthop_global_in;
else
p->u.prefix4 = pi->attr->nexthop;
p->prefixlen = IPV4_MAX_BITLEN;
}
}
break;
case AFI_IP6:
Expand All @@ -1057,7 +1068,6 @@ static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p)
/* If we receive MP_REACH nexthop with ::(LL)
* or LL(LL), use LL address as nexthop cache.
*/
p->prefixlen = IPV6_MAX_BITLEN;
if (pi->attr &&
pi->attr->mp_nexthop_len ==
BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL &&
Expand All @@ -1072,33 +1082,15 @@ static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p)
pi->attr->mp_nexthop_len ==
BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL) {
if (CHECK_FLAG(pi->attr->nh_flags,
BGP_ATTR_NH_MP_PREFER_GLOBAL)) {
if (IS_MAPPED_IPV6(
&pi->attr->mp_nexthop_global)) {
ipv4_mapped_ipv6_to_ipv4(
&pi->attr->mp_nexthop_global,
&ipv4);
p->u.prefix4 = ipv4;
p->prefixlen = IPV4_MAX_BITLEN;
p->family = AF_INET;
} else
p->u.prefix6 =
pi->attr->mp_nexthop_global;
} else
p->u.prefix6 =
pi->attr->mp_nexthop_local;
} else {
if (IS_MAPPED_IPV6(
&pi->attr->mp_nexthop_global)) {
ipv4_mapped_ipv6_to_ipv4(&pi->attr->mp_nexthop_global,
&ipv4);
p->u.prefix4 = ipv4;
p->prefixlen = IPV4_MAX_BITLEN;
p->family = AF_INET;
} else
BGP_ATTR_NH_MP_PREFER_GLOBAL))
p->u.prefix6 =
pi->attr->mp_nexthop_global;
}
else
p->u.prefix6 =
pi->attr->mp_nexthop_local;
} else
p->u.prefix6 = pi->attr->mp_nexthop_global;
p->prefixlen = IPV6_MAX_BITLEN;
}
break;
default:
Expand Down
5 changes: 4 additions & 1 deletion bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -9676,7 +9676,10 @@ void route_vty_out(struct vty *vty, const struct prefix *p,
json_object_string_add(json_nexthop_ll, "scope",
"link-local");

if (!CHECK_FLAG(attr->nh_flags,
if ((IPV6_ADDR_CMP(&attr->mp_nexthop_global,
&attr->mp_nexthop_local) !=
0) &&
!CHECK_FLAG(attr->nh_flags,
BGP_ATTR_NH_MP_PREFER_GLOBAL))
json_object_boolean_true_add(
json_nexthop_ll, "used");
Expand Down
29 changes: 5 additions & 24 deletions bgpd/bgp_updgrp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,6 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
gnh_modified = 1;
}
} else if (IN6_IS_ADDR_UNSPECIFIED(&v6nhglobal)) {
/* the UPDATE is originating from the local router.
* Build the global nexthop.
*/
mod_v6nhg = &peer->nexthop.v6_global;
gnh_modified = 1;
} else if ((peer->sort == BGP_PEER_EBGP)
Expand All @@ -524,32 +521,16 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
*/
mod_v6nhg = &peer->nexthop.v6_global;
gnh_modified = 1;
} else if (IS_MAPPED_IPV6(&v6nhglobal) &&
!IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_global)) {
/* prefer a IPv6 native global address over
* an IPv4-mapped IPv6 address as nexthop when
* forwarding UPDATEs.
*/
mod_v6nhg = &peer->nexthop.v6_global;
gnh_modified = 1;
}

if (peer->nexthop.v4.s_addr != INADDR_ANY &&
(IN6_IS_ADDR_UNSPECIFIED(mod_v6nhg) ||
(IN6_IS_ADDR_LINKLOCAL(mod_v6nhg) &&
((peer->connection->su.sa.sa_family == AF_INET6 &&
paf->afi == AFI_IP) ||
(peer->connection->su.sa.sa_family == AF_INET &&
paf->afi == AFI_IP6))))) {
ipv4_to_ipv4_mapped_ipv6(mod_v6nhg, peer->nexthop.v4);
gnh_modified = 1;
if (IN6_IS_ADDR_UNSPECIFIED(mod_v6nhg)) {
if (peer->nexthop.v4.s_addr != INADDR_ANY) {
ipv4_to_ipv4_mapped_ipv6(mod_v6nhg,
peer->nexthop.v4);
}
}

if (IS_MAPPED_IPV6(&peer->nexthop.v6_global)) {
/* If the interface to the peer has no global IPv6
* address, replace the nexthop in UPDATE with
* the IPv4-mapped IPv6 address if any.
*/
mod_v6nhg = &peer->nexthop.v6_global;
gnh_modified = 1;
}
Expand Down
Loading
Loading