summary refs log tree commit diff stats
path: root/results/classifier/118/socket/1837
blob: 9ea9035232f3d044653506818b6173a8a5220e38 (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
socket: 0.927
user-level: 0.885
architecture: 0.824
device: 0.713
arm: 0.687
network: 0.685
peripherals: 0.625
PID: 0.609
graphic: 0.530
ppc: 0.514
kernel: 0.460
performance: 0.442
files: 0.421
semantic: 0.352
vnc: 0.301
TCG: 0.289
boot: 0.279
risc-v: 0.244
VMM: 0.242
debug: 0.185
i386: 0.156
mistranslation: 0.150
x86: 0.136
assembly: 0.130
virtual: 0.115
KVM: 0.114
register: 0.093
hypervisor: 0.078
permissions: 0.022

Support IP_MULTICAST_IF socket option in linux-user
Additional information:
I've run into this limitation in qemu-aarch64-static version Debian 1:6.2+dfsg-2ubuntu6.12, but from the link above, it doesn't seem to be implemented on master yet.

Here's some source code that demonstrates the failure:
```
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/ip.h>
#include <unistd.h>
#include <assert.h>
#include <stdio.h>

int main()
{
    int fd, ret;
    struct in_addr addr = {htonl(INADDR_LOOPBACK)};

    fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
    assert(fd >= 0);
    ret = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &addr, sizeof(addr));
    if (ret < 0)
    {
        perror("setsockopt failed");
        return 1;
    }
    close(fd);
    printf("Success!\n");
    return 0;
}
```

When run under qemu, it gives the error `setsockopt failed: Protocol not available`.

It doesn't look like it should be too hard to support (certainly no worse than IP_ADD_MEMBERSHIP). Let me know if I can help with a patch.