summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/105/network/1903470
blob: df87b799138f161560daac50e6b2e5caca73ad79 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
network: 0.632
socket: 0.506
device: 0.429
semantic: 0.333
instruction: 0.300
graphic: 0.296
boot: 0.293
vnc: 0.243
mistranslation: 0.212
other: 0.204
assembly: 0.150
KVM: 0.131

qemu 5.1.0: Add UNIX socket support for netdev socket

qemu has a way to connect instances using a socket:

-netdev socket,id=str[,fd=h][,listen=[host]:port][,connect=host:port]

This can also be used to connect a qemu instance to something else using a socket connection, however there is no authentication or security to the connection, so rather than using a port which can be accessed by any user on the machine, having the ability to use or connect to UNIX sockets would be helpful, and adding this option should be fairly trivial.

UNIX sockets can be found in various parts of qemu (monitor, etc) so I believe having this on network would make sense.

With the fd= argument/property, you can setup a private socketpair connection already. Is this enough?

Thanks for the response. I'm not sure, how would I run qemu with a fd= socketpair on the command line? 

The wiki (https://wiki.qemu.org/index.php/Documentation/Networking) suggests for example to use:

-netdev socket,id=mynet0,listen=:1234
-netdev socket,id=mynet0,connect=:1234

This would allow however anyone on the same network (or in the world if run on a server) to connect to this network and possibly do bad things. Using localhost binding helps but is still risky if there is more than one user on a given machine. Using something like:

-netdev socket,id=mynet0,listen=~/.qemu-netsocket
-netdev socket,id=mynet0,connect=~/.qemu-netsocket

How would one do that with fd= ?

[Expired for QEMU because there has been no activity for 60 days.]

JFYI I miss the ability to use Unix socket right now.. I'm trying to use vagrant + vagrant-qemu + socket_vmnet on Macbook m1. It'd be MUCH easier to connect QEMU to the socket_vmnet' Unix socket directly w/o any wrappers..

This will be available in the next QEMU release (7.2) under a sligthly different form:

"-netdev stream" for TCP socket and "-netdev dgram" for UDP socket.

Both support inet and unix sockets. See qemu(1).

This was added to support passt:

https://passt.top

Despite what is said in an earlier comment, qemu(1) has no information on -netdev stream or -netdev dgram.

The best help I could find comes from the patch description:

https://<email address hidden>/

Example use:

-netdev stream,id=socket0,server=off,addr.type=unix,addr.path=/tmp/qemu0

Also useful to note that the reconnect argument is only going to be available in qemu 8.0.0 (not released yet)