Netdev List
 help / color / mirror / Atom feed
From: Julian Anastasov <ja@ssi.bg>
To: Chris Clark <chris.clark@alcatel-lucent.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: sendto() bug?
Date: Tue, 27 Aug 2013 09:02:16 +0300 (EEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1308270901120.1731@ja.ssi.bg> (raw)
In-Reply-To: <alpine.DEB.2.02.1308261319370.23968@optio.utah.ind.alcatel.com>


	Hello,

On Mon, 26 Aug 2013, Chris Clark wrote:

> On Sat, 24 Aug 2013, Julian Anastasov wrote:
> > On Fri, 23 Aug 2013, Chris Clark wrote:
> > > In the same vein as 2ad5b9e4, I'm soliciting feedback on something
> > > similar for raw_sendmsg():
> [snip]
> 
> > 	So, something like
> > (inet->hdrincl ? FLOWI_FLAG_KNOWN_NH : 0) ?
> 
> 
> Many thanks.  This patch indeed appears to resolve the problem:
> 
> diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
> index dd44e0a..61e60d6 100644
> --- a/net/ipv4/raw.c
> +++ b/net/ipv4/raw.c
> @@ -571,7 +571,8 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
>  	flowi4_init_output(&fl4, ipc.oif, sk->sk_mark, tos,
>  			   RT_SCOPE_UNIVERSE,
>  			   inet->hdrincl ? IPPROTO_RAW : sk->sk_protocol,
> -			   inet_sk_flowi_flags(sk) | FLOWI_FLAG_CAN_SLEEP,
> +			   inet_sk_flowi_flags(sk) | FLOWI_FLAG_CAN_SLEEP |
> +			    (inet->hdrincl ? FLOWI_FLAG_KNOWN_NH : 0),

	Looks good,

Suggested-by: Julian Anastasov <ja@ssi.bg>

>  			   daddr, saddr, 0, 0);
> 
>  	if (!inet->hdrincl) {
> 
> 
> Chris

Regards

--
Julian Anastasov <ja@ssi.bg>

      parent reply	other threads:[~2013-08-27  5:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23 19:19 sendto() bug? Chris Clark
2013-08-24  8:35 ` Julian Anastasov
2013-08-26 20:14   ` Chris Clark
2013-08-26 20:15     ` David Miller
2013-08-27  6:02     ` Julian Anastasov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.1308270901120.1731@ja.ssi.bg \
    --to=ja@ssi.bg \
    --cc=chris.clark@alcatel-lucent.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox