Page MenuHomeFreeBSD

sockets: don't call dom_dispose() on a listening socket
ClosedPublic

Authored by glebius on Wed, May 4, 6:44 PM.

Details

Summary

sorflush() already did the right thing, so only sofree() needed
a fix. Turn check into assertion in our only dom_dispose method.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markj added a subscriber: markj.

Does this fix a bug? It's not obvious to me if so. Setting UNPGC_IGNORE_RIGHTS on the listening socket should be harmless.

This revision is now accepted and ready to land.Wed, May 4, 7:29 PM

There is no bug here. The disposal is a socket buffer operation, so better do the check one layer up. This is a preparation before merging: sorflush(), dom_dispose, pru_flush and pru_shutdown into a single pru_shutdown method.