Skip to content

Commit

Permalink
nilaway: ipn/wg/wgconn, ipn/wg/agw, dns53/upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Dec 1, 2024
1 parent 54d9543 commit 1187776
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion intra/dns53/upstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func (t *transport) chooseProxy(pids []string) string {
}
for _, ipp := range t.IPPorts() {
if px, err := t.proxies.ProxyTo(ipp, core.UNKNOWN_UID_STR, pids); err == nil {
pid = px.ID()
pid = proxyID(px) // px is never nil, but nilaway complains
foundProxy = true
log.VV("dns53: proxy: choose: (%s) proxy(%s) for %s@%s; among %v",
t.id, pid, t.addrport, ipp, pids)
Expand Down
4 changes: 2 additions & 2 deletions intra/ipn/warp/agw.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ func (a *agwc) reg() (*AmzWgConfig, error) {
req.Header.Set("Accept", "application/json")

resp, err := a.http.Do(req)
if err != nil {
return nil, err
if err != nil || resp == nil {
return nil, core.OneErr(err, errNoApiResponse)
}
defer resp.Body.Close()

Expand Down
2 changes: 1 addition & 1 deletion intra/ipn/warp/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
)

var (
errNoApiResponse = errors.New("warp: no api response")
errNoApiResponse = errors.New("warp/agw: no api response")
errNoApiData = errors.New("warp: no api data")
errZeroIdentity = errors.New("warp: identity content empty")
errZeroPeers = errors.New("warp: no peers")
Expand Down
2 changes: 1 addition & 1 deletion intra/ipn/wg/wgconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ func (s *StdNetBind) Send(buf [][]byte, peer conn.Endpoint) (err error) {
if blackhole || !bufok {
return nil
}
if noconn {
if noconn || uc == nil {
return syscall.EAFNOSUPPORT
}

Expand Down

0 comments on commit 1187776

Please sign in to comment.