3 ms·
Normally if app opens a port it is not allowed to by firewall or application permissions it will just get error, with RAW sockets kernel would need to parse pac
by ilyt 4y ago
Normally if app opens a port it is not allowed to by firewall or application permissions it will just get error, with RAW sockets kernel would need to parse packet before deciding that.
For example normally you will get permission denied when you try to listen on sub-1024 port on normal user.
I'd also imagine if kernel is doing any kind of connection tracking (so really anything with firewall), it would be more optimal to have that connection tracked in kernel vs decoding it and adding to conntrack table.
I guess some kind of half-RAW could be done in place, like say a socket where you define protocol and port but handle actual packets in userspace ?