Re: [PATCH] ipv6: udp packets following an UFO enqueued packet need also be handled by UFO
From: Hannes Frederic Sowa <hidden>
Date: 2013-10-02 12:01:24
On Wed, Oct 02, 2013 at 12:33:33PM +0200, Jiri Pirko wrote:
Wed, Oct 02, 2013 at 01:25:34AM CEST, hannes@stressinduktion.org wrote:quoted
On Tue, Oct 01, 2013 at 11:47:21PM +0200, Hannes Frederic Sowa wrote:quoted
The strange thing is that if I don't do the IPV6_MTU setsockopt I don't get an oops.This is incorrect, it just depends on the size of the writes and on the interface mtu.quoted
IPv4 seems to work without problems, too.I also get kernel oopses from IPv4 now, too.I'm not able to trigger this with ipv4. Can you please send strace output for this as well?
I used this snippet on loopback with UFO enabled and lo mtu 1280.
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <linux/udp.h>
#include <stdio.h>
int test(int mtu)
{
int fd;
const int one = 1;
const int off = 0;
struct sockaddr_in addr = {.sin_family = AF_INET, .sin_port = htons(53) };
unsigned char buffer[3701];
inet_pton(AF_INET, "127.0.0.1", &addr.sin_addr);
fd = socket(AF_INET, SOCK_DGRAM, 0);
connect(fd, (struct sockaddr *) &addr, sizeof(addr));
setsockopt(fd, IPPROTO_UDP, UDP_CORK, &one, sizeof(one));
write(fd, " ", 1);
write(fd, buffer, sizeof(buffer));
write(fd, " ", 1);
setsockopt(fd, IPPROTO_UDP, UDP_CORK, &off, sizeof(off));
close(fd);
}
int main() {
test(1280);
}
Greetings,
Hannes