Skip to content

Commit f7924ab

Browse files
Merge pull request #1104 from nightmeng/master
Fix a bug of cross-subnet check
2 parents 659fbad + a278ea2 commit f7924ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

calico_node/filesystem/etc/calico/confd/templates/bird_ipam.cfg.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ filter calico_ipip {
1515
{{range ls "/v1/ipam/v4/pool"}}{{$data := json (getv (printf "/v1/ipam/v4/pool/%s" .))}}
1616
if ( net ~ {{$data.cidr}} ) then {
1717
{{if $data.ipip_mode}}{{if eq $data.ipip_mode "cross-subnet"}}
18-
if ( from ~ {{$network}} ) then
18+
if ( bgp_next_hop ~ {{$network}} ) then
1919
krt_tunnel = ""; {{/* Destination in ipPool, mode is cross sub-net, route from-host on subnet, do not use IPIP */}}
2020
else
2121
krt_tunnel = "{{$data.ipip}}"; {{/* Destination in ipPool, mode is cross sub-net, route from-host off subnet, set the tunnel (if IPIP not enabled, value will be "") */}}

0 commit comments

Comments
 (0)