Opened 13 years ago
Last modified 13 years ago
#7649 closed defect
bridged networking does not work starting with 2.6.35 on TAP-devices — at Version 2
Reported by: | Michael Kromer | Owned by: | |
---|---|---|---|
Component: | network | Version: | VirtualBox 3.2.10 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Linux |
Description (last modified by )
As you can read on
http://amailbox.org/mailarchive/linux-netdev/2010/10/23/6288128/thread
VBox stops working with bridged Networking and TAP devices since 2.6.35.
I don't think VBox.log will help you much, the only thing which might help is that transmits are ok, but recv is completely dead.
A short test with
#include <fcntl.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/types.h> #include <net/if.h> #include <linux/if_tun.h> int main(int argc, const char **argv) { struct ifreq ifr; char *p; int fd; if (argc < 2) { fprintf(stderr, "Need tun name\n"); return EXIT_FAILURE; } fd = open("/dev/net/tun", O_RDWR); if (fd < 0) { perror("open"); return EXIT_FAILURE; } memset(&ifr, 0, sizeof(ifr)); ifr.ifr_flags = IFF_TAP | IFF_NO_PI; p = strncpy(ifr.ifr_name, argv[1], sizeof(ifr.ifr_name) - 1); if (ioctl(fd, TUNSETIFF, &ifr) < 0) { perror("ioctl"); return EXIT_FAILURE; } while (true) sleep(3600); return EXIT_SUCCESS; }
results in a positive fix.
I think the problem is, that vboxnetflt simply transmits via skb->dev=tapX and doesn't open the tap/tun fd. The upstream (kernel) patch is suboptimal for vbox in a way that it actually needs to open the file descriptor - otherwise the interface has status NO-CARRIER and packets will not be accepted by core kernel.
Change History (2)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Description: | modified (diff) |
---|
Correction: Problem exists since 2.6.36, not 2.6.35 with commit bee31369ce16fc3898ec9a54161248c9eddb06bc (follow the link posted, it provides exact information)