Skip to content

Commit

Permalink
Try to find what is writing after close
Browse files Browse the repository at this point in the history
  • Loading branch information
nbrownus committed Jul 25, 2023
1 parent e5af94e commit 9c62444
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 38 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,9 @@ jobs:
go-version-file: 'go.mod'
check-latest: true

- name: Build
run: make all

- name: Vet
run: make vet

- name: Test
run: make test

- name: End 2 end
run: make e2evv

- uses: actions/upload-artifact@v3
with:
name: e2e packet flow
path: e2e/mermaid/
if-no-files-found: warn

test-linux-boringcrypto:
name: Build and test on linux with boringcrypto
runs-on: ubuntu-latest
Expand All @@ -55,12 +40,6 @@ jobs:
go-version-file: 'go.mod'
check-latest: true

- name: Build
run: make bin-boringcrypto

- name: Test
run: make test-boringcrypto

- name: End 2 end
run: make e2evv GOEXPERIMENT=boringcrypto CGO_ENABLED=1

Expand All @@ -79,23 +58,6 @@ jobs:
go-version-file: 'go.mod'
check-latest: true

- name: Build nebula
run: go build ./cmd/nebula

- name: Build nebula-cert
run: go build ./cmd/nebula-cert

- name: Vet
run: make vet

- name: Test
run: make test

- name: End 2 end
run: make e2evv

- uses: actions/upload-artifact@v3
with:
name: e2e packet flow
path: e2e/mermaid/
if-no-files-found: warn
2 changes: 2 additions & 0 deletions e2e/handshakes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,8 @@ func TestStage1RaceRelays(t *testing.T) {
p := r.RouteForAllUntilTxTun(myControl)
_ = p

r.FlushAll()

myControl.Stop()
theirControl.Stop()
relayControl.Stop()
Expand Down
1 change: 1 addition & 0 deletions outside.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ func (f *Interface) handleEncrypted(ci *ConnectionState, addr *udp.Addr, h *head
// Else, send recv errors for 300 seconds after a restart to allow fast reconnection.
if ci == nil || !ci.window.Check(f.l, h.MessageCounter) {
if addr != nil {
f.l.Error("NATE", h.String())
f.maybeSendRecvError(addr, h.RemoteIndex)
return false
} else {
Expand Down
10 changes: 10 additions & 0 deletions udp/udp_tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ func (u *TesterConn) WriteTo(b []byte, addr *Addr) error {
copy(p.ToIp, addr.IP.To16())
copy(p.FromIp, u.Addr.IP.To16())

defer func() {
if err := recover(); err != nil {
h := header.H{}
h.Parse(b)
fmt.Println("Packet header was: ", h.String())
fmt.Println(err)
panic("Re-panic")
}
}()

u.TxPackets <- p
return nil
}
Expand Down

0 comments on commit 9c62444

Please sign in to comment.