Re: [PATCH v2] net: ipv4: add IPPROTO_ICMP socket kind

From: David Miller
Date: Tue May 10 2011 - 15:16:28 EST


From: Vasiliy Kulikov <segoon@xxxxxxxxxxxx>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/