luci-app-dockerman: proper handling of hostIP in ports#8422
Open
icegood wants to merge 1 commit intoopenwrt:masterfrom
Open
luci-app-dockerman: proper handling of hostIP in ports#8422icegood wants to merge 1 commit intoopenwrt:masterfrom
icegood wants to merge 1 commit intoopenwrt:masterfrom
Conversation
9144271 to
00605a1
Compare
1) Retain during containers copying 2) Make it clickable against 2.1 router host if ip is general 2.2 against given host if specific Fixes openwrt#7850 Signed-off-by: Serhii Ivanov <icegood1980@gmail.com>
00605a1 to
40b87ae
Compare
This comment has been minimized.
This comment has been minimized.
systemcrash
reviewed
Mar 29, 2026
| if (Array.isArray(bindings)) { | ||
| for (const b of bindings) { | ||
| if (!b?.HostPort) continue; | ||
| const ip = (b.HostIp && b.HostIp !== '0.0.0.0') ? b.HostIp + ':' : ''; |
Contributor
There was a problem hiding this comment.
Do we need an IPv6 check here also?
systemcrash
reviewed
Mar 29, 2026
| if (m) return [`${m[2]}/${m[3]}`, [{ HostPort: m[1] }]]; | ||
| return null; | ||
| // formats: hostPort:cPort/proto or hostIp:hostPort:cPort/proto | ||
| const m = p.match(/^(?:([^:]+):(\d+)|(\d+)):(\d+)\/(tcp|udp)$/); |
Contributor
There was a problem hiding this comment.
How about two different matches - one for each type. This way it's easier to read the code.
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.
2.1 router host if ip is general
2.2 against given host if specific
Fixes #7850
Signed-off-by: <my@email.address>row (viagit commit --signoff)<package name>: titlefirst line subject for packagesPKG_VERSIONin the Makefile