serenity
serenity copied to clipboard
Kernel: Make IPv4 TTL configurable
This change adds default_ttl to /sys/kernel/variables and links the functionality through NetworkingManagement to IPv4 sockets.
DefaultTTL is an IntegerVariable type for retrieving the TTL value from the SysFS file.
NetworkingManagement has a new static variable to store the TTL. This becomes the single point for configuring default TCP/IP TTL on the system.
IPv4Socket and NetworkTask reference the value from NetworkingManagement rather than using their previously hard-coded values. This removes one FIXME from NetworkTask.
This PR is dependent on #19543
There's probably a safer AK helper for string to integer conversion
That would impact #19543 - I can adjust there as necessary. However, I'm not sure when/where things are kept to the minimalist kernel libraries (such as KString being used in StringVariable) and where it's okay to reach out to AK - any suggestions?
I apologize I should probably stay within what I know, reviews to your other PR will most likely be made soon about ways you could improve it
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!