-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow port numbers be be specified using a either a colon or a space #4328
Conversation
…(e.g 1.2.3.4:51235 and 1.2.3.4 51235)
bfb9bd6
to
c4ce512
Compare
Thanks for the review @nbougalis. After some consideration I decided simply detecting the presence of more than one colon should be sufficient to filter out IPv6 cases. Since IPv6 can be ambiguous if a colon is used for port (in particular if square braces are also not used), IPv6 ports must remain specified via space character. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good with the change to detect IPv6 addresses.
I have an idea for a more comprehensive fix (improve Boost's parsers, and use those 😆) but this is fine for now.
@RichardAH when you have a chance, please respond to ximinez's comments above. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't mind seeing develop
merged in to the branch just so CI can get a shot at it, but I don't see a problem if not. Sorry for the delay!
@RichardAH I merged (do not merge it yet) |
* upstream/develop: Rectify the import paths of boost/iterator: (XRPLF#4293) Allow port numbers be be specified with a colon: (XRPLF#4328) Use <=> operator for base_uint, Issue, and Book: (XRPLF#4411) Reporting Mode: Do not attempt to acquire missing data from peer network (XRPLF#4458)
* upstream/develop: Rectify the import paths of boost/iterator: (XRPLF#4293) Allow port numbers be be specified with a colon: (XRPLF#4328) Use <=> operator for base_uint, Issue, and Book: (XRPLF#4411) Reporting Mode: Do not attempt to acquire missing data from peer network (XRPLF#4458)
* upstream/develop: Rectify the import paths of boost/iterator: (XRPLF#4293) Allow port numbers be be specified with a colon: (XRPLF#4328) Use <=> operator for base_uint, Issue, and Book: (XRPLF#4411) Reporting Mode: Do not attempt to acquire missing data from peer network (XRPLF#4458)
* upstream/develop: Rectify the import paths of boost/iterator: (XRPLF#4293) Allow port numbers be be specified with a colon: (XRPLF#4328) Use <=> operator for base_uint, Issue, and Book: (XRPLF#4411) Reporting Mode: Do not attempt to acquire missing data from peer network (XRPLF#4458)
* upstream/develop: Rectify the import paths of boost/iterator: (XRPLF#4293) Allow port numbers be be specified with a colon: (XRPLF#4328) Use <=> operator for base_uint, Issue, and Book: (XRPLF#4411) Reporting Mode: Do not attempt to acquire missing data from peer network (XRPLF#4458)
…ctionality * upstream/develop: Rectify the import paths of boost/iterator: (XRPLF#4293) Allow port numbers be be specified with a colon: (XRPLF#4328) Use <=> operator for base_uint, Issue, and Book: (XRPLF#4411) Reporting Mode: Do not attempt to acquire missing data from peer network (XRPLF#4458)
…tpage * upstream/develop: Rectify the import paths of boost/iterator: (XRPLF#4293) Allow port numbers be be specified with a colon: (XRPLF#4328) Use <=> operator for base_uint, Issue, and Book: (XRPLF#4411) Reporting Mode: Do not attempt to acquire missing data from peer network (XRPLF#4458)
High Level Overview of Change
An annoying gotcha for node operators is accidentally specifying IP:PORT combinations using a colon. Rippled expects a space, not a colon, and for whatever reason does not provide good feedback when this operator error is made.
This small PR simply allows this mistake (colon) to be replaced inline with a space, preserving the intention of the operator.
Context of Change
Type of Change
Test Plan
testColons()
has been added to the config unit tests. This tests the functionality when specifying IP:PORT in rippled.cfg.