Commit 16cf565
committed
vminitd: Fall back to /proc/net/pnp for unset nameservers or domain
When configureDns is called with an empty nameservers list or no domain,
read /proc/net/pnp (written by the kernel IP_PNP DHCP client) and use
any nameserver and domain lines found there. The two are filled in
independently, so an explicit nameserver does not prevent the domain
from being read from pnp. This provides automatic DNS configuration
for bridge-mode containers without a new RPC or proto change.1 parent 23c8a66 commit 16cf565
1 file changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1267 | 1267 | | |
1268 | 1268 | | |
1269 | 1269 | | |
1270 | | - | |
1271 | 1270 | | |
1272 | 1271 | | |
1273 | 1272 | | |
1274 | 1273 | | |
1275 | 1274 | | |
1276 | | - | |
| 1275 | + | |
1277 | 1276 | | |
1278 | 1277 | | |
1279 | 1278 | | |
| |||
1282 | 1281 | | |
1283 | 1282 | | |
1284 | 1283 | | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
1285 | 1301 | | |
1286 | | - | |
| 1302 | + | |
1287 | 1303 | | |
1288 | 1304 | | |
1289 | 1305 | | |
| |||
0 commit comments