diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-10-24 11:28:02 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-10-25 10:13:03 +0100 |
commit | 57f0f8c9b7af75906ca5f758eedb8475b8cbcda6 (patch) | |
tree | c44a89983be343841b8d28673454b77f695b62ea /DevTools | |
parent | 290e7957b74e0b929be4bd6d07c07b3719f5e58d (diff) | |
download | serenity-57f0f8c9b7af75906ca5f758eedb8475b8cbcda6.zip |
UserspaceEmulator: Handle SO_BINDTODEVICE in setsockopt
Diffstat (limited to 'DevTools')
-rw-r--r-- | DevTools/UserspaceEmulator/Emulator.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/DevTools/UserspaceEmulator/Emulator.cpp b/DevTools/UserspaceEmulator/Emulator.cpp index ab763175f6..e72d8d57d8 100644 --- a/DevTools/UserspaceEmulator/Emulator.cpp +++ b/DevTools/UserspaceEmulator/Emulator.cpp @@ -531,6 +531,13 @@ int Emulator::virt$setsockopt(FlatPtr params_addr) return rc; } + if (params.option == SO_BINDTODEVICE) { + auto ifname = mmu().copy_buffer_from_vm((FlatPtr)params.value, params.value_size); + params.value = ifname.data(); + params.value_size = ifname.size(); + return syscall(SC_setsockopt, ¶ms); + } + TODO(); } |