From: Eric Dumazet <eric.dumazet@gmail.com>
To: Francesco Fusco <ffusco@redhat.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] ipv4: processing ancillary IP_TOS or IP_TTL
Date: Thu, 15 Aug 2013 21:26:58 -0700 [thread overview]
Message-ID: <1376627218.4648.2.camel@edumazet-glaptop> (raw)
In-Reply-To: <d54a214ad9301352128f2b3300c0eaf91cc6e12e.1376494032.git.ffusco@redhat.com>
On Wed, 2013-08-14 at 17:48 +0200, Francesco Fusco wrote:
> If IP_TOS or IP_TTL are specified as ancillary data, then sendmsg() sends out
> packets with the specified TTL or TOS overriding the socket values specified
> with the traditional setsockopt().
>
> If there is a per-packet specified tos, the skb->priority is set accordingly.
> The ipv4_is_multicast() function is used to fill in the right TTL value in case
> of multicast destinations.
>
> Signed-off-by: Francesco Fusco <ffusco@redhat.com>
> ---
> @@ -1327,7 +1332,7 @@ struct sk_buff *__ip_make_skb(struct sock *sk,
> iph = (struct iphdr *)skb->data;
> iph->version = 4;
> iph->ihl = 5;
> - iph->tos = inet->tos;
> + iph->tos = (cork->tos != inet->tos) ? cork->tos : inet->tos;
Strange construct, as the following has same meaning.
iph->tos = cork->tos;
next prev parent reply other threads:[~2013-08-16 4:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 15:48 [PATCH net-next 0/2] ipv4: per-datagram IP_TOS and IP_TTL via sendmsg() Francesco Fusco
2013-08-14 15:48 ` [PATCH net-next 1/2] ipv4: IP_TOS and IP_TTL can be specified as ancillary data Francesco Fusco
2013-08-15 20:51 ` David Miller
2013-08-14 15:48 ` [PATCH net-next 2/2] ipv4: processing ancillary IP_TOS or IP_TTL Francesco Fusco
2013-08-16 4:26 ` Eric Dumazet [this message]
2013-08-16 4:35 ` Eric Dumazet
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=1376627218.4648.2.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=ffusco@redhat.com \
--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