lkml.org 
[lkml]   [2011]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] net: ipv4: add IPPROTO_ICMP socket kind
From
From: Vasiliy Kulikov <segoon@openwall.com>
Date: Tue, 10 May 2011 22:09:59 +0400

In net-next-2.6 we're trying to get rid of uses of route identity
information, and also the types used for flow lookup keys are
completely different. This code won't compile as-is.

> + {
> + struct flowi fl = { .oif = ipc.oif,

This should be "struct flowi4 fl4", declare it at the top
level of the function so you can get at the fully resolved
key values later in this function.

Then use "flowi4_init_output(...) to initialize the flow instead of
this explicit assignment.

> + if (!ipc.addr)
> + ipc.addr = rt->rt_dst;

Replase rt->rt_dst with fl4.daddr

> + err = ip_append_data(sk, ping_getfrag, &pfh, len,
> + 0, &ipc, &rt,
> + msg->msg_flags);

ip_append_data() now takes a flowi4 key pointer as an argument, so
you'll need to pass "&fl4" in.

A lot has changed in this area, your code won't even compile, so
please adjust your patch to fit net-next-2.6 as needed, perhaps
using net/ipv4/raw.c and net/ipv4/udp.c as a guide.

Thanks.


\
 
 \ /
  Last update: 2011-05-10 21:19    [W:1.502 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site