Skip to content

Commit

Permalink
bpftrace-compiler: don't use 127.1 forwarding
Browse files Browse the repository at this point in the history
but use localhost, because this works even since before
commit 455bf4b

Signed-off-by: Christoph Ostarek <[email protected]>
  • Loading branch information
christoph-zededa committed Sep 18, 2024
1 parent a6e7edb commit a178d02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eve-tools/bpftrace-compiler/edgeview.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ func (er *edgeviewRun) stopHTTPDebugPort() {
func (er *edgeviewRun) forwardHTTPDebugPort() error {
var err error

hostForward := "localhost:6543"
er.ctx, er.cancel = context.WithTimeout(context.Background(), 5*time.Minute)
er.cmd = exec.CommandContext(er.ctx, "bash", er.path, "tcp/127.0.0.1:6543")
er.cmd = exec.CommandContext(er.ctx, "bash", er.path, fmt.Sprintf("tcp/%s", hostForward))

er.tty, err = pty.Start(er.cmd)
if err != nil {
Expand All @@ -150,7 +151,7 @@ func (er *edgeviewRun) forwardHTTPDebugPort() error {
line := scanner.Text()
output += line + "\n"

if strings.Contains(line, "127.0.0.1:6543") {
if strings.Contains(line, hostForward) {
forwardLine = strings.TrimFunc(line, func(r rune) bool {
return !unicode.IsGraphic(r)
})
Expand Down

0 comments on commit a178d02

Please sign in to comment.