Commit 39a08c74 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Create new sockets with the same GID as master

parent 12a1282e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ class InterfaceMethodsTests(unittest.TestCase):

			client.sock.send.assert_called_once()
			args = client.sock.send.call_args[0]
			assert args[0].startswith(b"INTERFACE_ADD enp1s0\t\twired\t/tmp\t")
			assert args[0].startswith(b"INTERFACE_ADD enp1s0\t\twired\tDIR=/tmp GROUP=")

	@patch('wpa_supplicant.client.interfaces.InterfaceClient.connect',
			new_callable=anyio_mock.AsyncMock)
+2 −1
Original line number Diff line number Diff line
@@ -51,9 +51,10 @@ class MasterClient(BaseClient):
		"""
		Add a network interface to the daemon's control interfaces
		"""
		ctrl_iface = f"DIR={self.ctrl_dir} GROUP={self.ctrl_dir.group()}"
		await self.send_message(
			consts.COMMAND_INTERFACE_ADD,
			ifname, '', driver, self.ctrl_dir.as_posix(), driver_param,
			ifname, '', driver, ctrl_iface, driver_param,
		)

	async def connect_interface(self, ifname: str) -> InterfaceClient: