Commit 085eb6c
committed
Force RST on client sockets during shutdown
On OpenBSD, SO_REUSEADDR and SO_REUSEPORT are not sufficient
to rebind when orphaned FIN_WAIT_2 connections hold the listen
address. Set SO_LINGER with l_linger=0 on accepted client
sockets before closing during shutdown so the kernel sends RST
instead of FIN and releases the PCB immediately.1 parent 3d13fa8 commit 085eb6c
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1844 | 1844 | | |
1845 | 1845 | | |
1846 | 1846 | | |
1847 | | - | |
1848 | | - | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
1849 | 1861 | | |
1850 | 1862 | | |
1851 | 1863 | | |
| |||
0 commit comments