Commit d56c259
committed
fix(docker): use configured gateways for VLAN networks
- Purpose: keep Docker custom networks on VLAN and secondary interfaces from losing their configured gateway during automatic network recreation.
- Before: rc.docker only read the gateway from a default route on the interface, so VLANs without an interface-specific default route created Docker networks without --gateway.
- Why that was a problem: Docker could claim the first subnet address as the macvlan/ipvlan gateway, colliding with real VLAN gateways such as 192.168.10.1 and breaking DHCP or static-IP containers.
- What the new change accomplishes: automatic Docker network creation now falls back to the configured IPv4 or IPv6 gateway stored in network.ini when no live default route exists.
- How it works: configured_gateway maps br/bond network names back to their eth network.ini section, resolves VLAN IDs to their indexed entries, and returns the matching GATEWAY or GATEWAY6 value before network create arguments are assembled.1 parent 373651a commit d56c259
1 file changed
Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
213 | 258 | | |
214 | 259 | | |
215 | 260 | | |
| |||
470 | 515 | | |
471 | 516 | | |
472 | 517 | | |
| 518 | + | |
473 | 519 | | |
474 | 520 | | |
475 | 521 | | |
| |||
481 | 527 | | |
482 | 528 | | |
483 | 529 | | |
| 530 | + | |
484 | 531 | | |
485 | 532 | | |
486 | 533 | | |
| |||
0 commit comments