mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
net/sock: option to specify local address
Add an option to specify the host IP to send multicast packets from, when using a multicast socket for networking. The option takes an IP address and sets the IP_MULTICAST_IF socket option, which causes the packets to use that IP's interface as an egress. This is useful if the host machine has several interfaces with several virtual networks across disparate interfaces. Signed-off-by: Mike Ryan <mikeryan@ISI.EDU> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
138b38b61b
commit
3a75e74c76
3 changed files with 52 additions and 15 deletions
4
net.c
4
net.c
|
@ -1050,6 +1050,10 @@ static const struct {
|
|||
.name = "mcast",
|
||||
.type = QEMU_OPT_STRING,
|
||||
.help = "UDP multicast address and port number",
|
||||
}, {
|
||||
.name = "localaddr",
|
||||
.type = QEMU_OPT_STRING,
|
||||
.help = "source address for multicast packets",
|
||||
},
|
||||
{ /* end of list */ }
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue