#758

forwarder: recreate stale connected UDP sockets

Opensairex53wants to merge intofrom

Summary

Connected UDP sockets can remain bound to a source IP that disappears after a host network change. Writes then keep failing with EADDRNOTAVAIL, leaving long-lived UDP flows broken indefinitely.

Retire the stale socket when a write returns EADDRNOTAVAIL, redial, and retry that datagram once. Track socket identity so the old reply loop cannot remove a replacement connection when it exits.

Fixes #648.

Testing

  • go test ./pkg/services/forwarder -count=1
  • go test -race ./pkg/services/forwarder -run TestUDPProxy -count=1
  • git diff --check

The full go test ./... run did not complete: it entered the QEMU end-to-end suite and was stopped while its setup was still running.

Activity

2
openshift-ci[bot]6d ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sairex53 Once this PR has been reviewed and has the lgtm label, please assign vyasgun for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment