Skip to content

Commit

Permalink
Merge pull request #3724 from apostasie/bypass
Browse files Browse the repository at this point in the history
Create directory for bypass4netns pid file
  • Loading branch information
AkihiroSuda authored Dec 3, 2024
2 parents eed4480 + 32ab747 commit c0b8f63
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/bypass4netnsutil/bypass4netnsutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,14 @@ func GetPidFilePathByID(id string) (string, error) {
return "", err
}

socketPath := filepath.Join(xdgRuntimeDir, "bypass4netns", id[0:15]+".pid")
return socketPath, nil
pidPath := filepath.Join(xdgRuntimeDir, "bypass4netns", id[0:15]+".pid")

err = os.MkdirAll(filepath.Join(xdgRuntimeDir, "bypass4netns"), 0o700)
if err != nil {
return "", err
}

return pidPath, nil
}

func IsBypass4netnsEnabled(annotationsMap map[string]string) (enabled, bindEnabled bool, err error) {
Expand Down

0 comments on commit c0b8f63

Please sign in to comment.