X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fkernel%2Fswift.c;h=b3aa899650e60031a588f27acf66243ea48d7506;hb=22efaec1b5870682823de23a7a7a77bb738f0d1e;hp=1a7e164d91103e69e22c804b7aa3c7d00a2a4b0c;hpb=c3020b98a62024b7e9d74f23c041358e0f1a5c0b;p=swifty.git diff --git a/src/kernel/swift.c b/src/kernel/swift.c index 1a7e164..b3aa899 100644 --- a/src/kernel/swift.c +++ b/src/kernel/swift.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -310,7 +311,11 @@ static int swift_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr log_error("Route lookup failed\n"); goto out_free; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + sk_dst_set(sk, dst_clone(&rt->u.dst)); +#else sk_dst_set(sk, dst_clone(&rt->dst)); +#endif } err = ip_queue_xmit(skb);