--- linux-2.6.5.orig/net/ipv4/raw.c 2004-05-12 12:34:24.000000000 +0200 +++ linux-2.6.5/net/ipv4/raw.c 2004-06-01 10:30:59.803009792 +0200 @@ -430,7 +430,7 @@ static int raw_sendmsg(struct kiocb *ioc .proto = inet->hdrincl ? IPPROTO_RAW : sk->sk_protocol, }; - err = ip_route_output_flow(&rt, &fl, sk, !(msg->msg_flags&MSG_DONTWAIT)); + err = ip_route_output_flow(&rt, &fl, sk, (msg->msg_flags&MSG_DONTWAIT)); } if (err) goto done; --- linux-2.6.5.orig/net/ipv4/udp.c 2004-05-12 12:34:24.000000000 +0200 +++ linux-2.6.5/net/ipv4/udp.c 2004-06-01 10:30:42.839380150 +0200 @@ -599,7 +599,7 @@ int udp_sendmsg(struct kiocb *iocb, stru .uli_u = { .ports = { .sport = inet->sport, .dport = dport } } }; - err = ip_route_output_flow(&rt, &fl, sk, !(msg->msg_flags&MSG_DONTWAIT)); + err = ip_route_output_flow(&rt, &fl, sk, (msg->msg_flags&MSG_DONTWAIT)); if (err) goto out; --- linux-2.6.5.orig/net/xfrm/xfrm_policy.c 2004-05-12 12:34:24.000000000 +0200 +++ linux-2.6.5/net/xfrm/xfrm_policy.c 2004-06-01 10:33:44.309324633 +0200 @@ -776,7 +776,7 @@ restart: if (unlikely(nx<0)) { err = nx; - if (err == -EAGAIN && flags) { + if (err == -EAGAIN && !(flags & MSG_DONTWAIT)) { DECLARE_WAITQUEUE(wait, current); add_wait_queue(&km_waitq, &wait);