Skip to content

Commit

Permalink
Includes IPv6 interface configs only if IPv6 exists (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkinkade committed Feb 28, 2024
1 parent 7f12766 commit b98b0ab
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configs/stage3_ubuntu/opt/mlab/bin/generate_network_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,20 @@ Address=$ADDR_IPv4
Gateway=$GATEWAY_IPv4
DNS=$DNS1_IPv4
DNS=$DNS2_IPv4
EOF

# Append IPv6 configs, but only if IPv6 configs exist. If there is no IPv6
# config, then the we would be left with "DNS=", which apparently overrides the
# previous IPv4 DNS settings, leaving a machine with no configured nameservers,
# and thus no name resolution.
if [[ -n $FIELDS_IPv6 ]]; then
cat >> $OUTPUT <<EOF
# IPv6
Address=$ADDR_IPv6
Gateway=$GATEWAY_IPv6
DNS=$DNS1_IPv6
IPv6AcceptRA=no
EOF
fi

0 comments on commit b98b0ab

Please sign in to comment.