Repository navigation
fix(ns2): give the mod server a routable address and quote parameters - #5247
Merged
Merged
Conversation
Build 345 refuses to start the mod web server on 0.0.0.0. On hosts with more than one IP address and no ip set, check_ip.sh leaves httpip at 0.0.0.0, so -modserveraddress and -webdomain get 0.0.0.0. A pre-start fix now replaces it with the source address of the default route. Build 345 also requires values containing -, + or ; to be quoted, so -webdomain, -webuser, -modserveraddress and -map are now quoted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Natural Selection 2 build 345 refuses to start the mod web server on
0.0.0.0("Mod web server needs a routable address, not 0.0.0.0 - set -modserveraddress to the address clients reach this server on"). Develop already passes-modserveraddress ${httpip}, which works on a host with one IP address. On a host with more than one address and noipset,check_ip.shleaveshttpipat0.0.0.0, so the mod server still fails to start.This PR adds a pre-start fix,
fix_ns2.sh. Whenhttpipis0.0.0.0, the fix replaces it with the source address of the default route (ip -o -4 route get 1.1.1.1). A user-setipis not changed.Build 345 also requires quotes around command-line values that contain
-,+or;. The-webdomain,-webuser,-modserveraddressand-mapvalues are now quoted, to match the parameters that were already quoted. The defaults are not affected. Before this change, a custom map or web user name containing a hyphen would have broken the launch.Known limit:
detailsstill shows0.0.0.0in the start parameters on multi-address hosts, because the fix only runs on start.Related to #5241
Affected servers: ns2
Type of change
Testing
ns2serverinstall,start,monitorandstop. First with develop on a single-address host. Then with this branch on a host given a second IPv4 address (ip addr add).monitordid not restart the server, andstopwas graceful on the first CTRL+c.0.0.0.0logs the "needs a routable address" error and the mod server port is not opened.Risk and rollback
ns2server, and only whenhttpipis0.0.0.0. The quoting only adds quotes.Breaking changes
Documentation
Checklist
PR will not be merged until all steps are complete.
Thank you for your Pull Request!