Skip to content

ipv4: per-datagram IP_TOS and IP_TTL via sendmsg()

Francesco Fusco netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyIn review
  2. v22 patches 4 repliesSuperseded
  3. v12 patches 3 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ipv4: IP_TOS and IP_TTL can be specified as ancillary datainclude/net/ip.h net/ipv4/ip_sockglue.c+22 -10 replies
2/2ipv4: processing ancillary IP_TOS or IP_TTLinclude/net/inet_sock.h include/net/ip.h include/net/route.h +5 more+39 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH net-next v3 0/2] ipv4: per-datagram IP_TOS and IP_TTL via sendmsg()

There is no way to set the IP_TOS field on a per-packet basis in IPv4, while IPv6 has such a mechanism. Therefore one has to fall back to the setsockopt() in case of IPv4.

Using the existing per-socket option is not convenient particularly in the situations where multiple threads have to use the same socket data requiring per-thread TOS values. In fact this would involve calling setsockopt() before sendmsg() every time.

Francesco Fusco (2):
ipv4: IP_TOS and IP_TTL can be specified as ancillary data
ipv4: processing ancillary IP_TOS or IP_TTL

 include/net/inet_sock.h |  3 +++
 include/net/ip.h        | 14 ++++++++++++++
 include/net/route.h     |  1 +
 net/ipv4/icmp.c         |  5 +++++
 net/ipv4/ip_output.c    | 13 ++++++++++---
 net/ipv4/ip_sockglue.c  | 20 +++++++++++++++++++-
 net/ipv4/ping.c         |  4 +++-
 net/ipv4/raw.c          |  4 +++-
 net/ipv4/udp.c          |  4 +++-
 9 files changed, 61 insertions(+), 7 deletions(-)
Signature · 1 line
1.8.3.1