Skip to content

Commit

Permalink
Always set IS_IP* env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbaur committed Oct 18, 2024
1 parent ff72c26 commit b61bfdc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ipwatch/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ func runHook(program string, ifaceIdx uint32, addr netip.Addr) (string, error) {
switch {
case addr.Is6():
cmd.Env = append(cmd.Env, "IS_IP6=1")
cmd.Env = append(cmd.Env, "IS_IP4=0")
case addr.Is4():
cmd.Env = append(cmd.Env, "IS_IP6=0")
cmd.Env = append(cmd.Env, "IS_IP4=1")
}

Expand Down

0 comments on commit b61bfdc

Please sign in to comment.