Commit 7228ca7
Fix: Update ipv6 default route with interface index
The changes introduced in PR:
This change allows the IPAM plugin to use the "interfaces" field to pass uplink interface information to Cilium, so Cilium can set up host routes for Pods based on that info. While the "interfaces" field is defined in the CNI spec it hasn’t been used by IPAM plugins yet. With this approach, Cilium can better support environments with multiple uplinks in native routing mode without cloud-specific logic, maintaining full control over Pod traffic routing.
Why is this PR change required:
The kernel determines which interface (e.g., eth0, eth1) to use based on the index provided with the default route. When the gateway belongs to the pod subnet, the kernel can identify the correct interface without this index. However, in this case, the gateway is a link-local address, which is not tied to a specific interface. As a result, the kernel cannot determine which interface to use for the gateway and raises an error. The fix is a single-line change: passing the interface index to the default route, similar to how it is handled for IPv6 routes. This allows the kernel to correctly associate the route with the appropriate interface
Fixes: [c90aed4](Support IPv6 for delegated IPAM)
Signed-off-by: NihaNallappagari <nihan@microsoft.com>1 parent 6f417f7 commit 7228ca7
1 file changed
Lines changed: 15 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
204 | 218 | | |
205 | 219 | | |
206 | 220 | | |
| |||
209 | 223 | | |
210 | 224 | | |
211 | 225 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
| 226 | + | |
219 | 227 | | |
220 | 228 | | |
221 | 229 | | |
| |||
0 commit comments