Project

General

Profile

Actions

Feature #13175

closed

Add support for IP_RECVTOS

Added by Dan McDonald 11 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
networking
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

A SmartOS LX user discovered our lack of support using an LX zone. See https://github.com/joyent/illumos-joyent/issues/330 for that user's specific problem.

This is a case where to fix it in LX requires getting it to work in illumos native zones first. Luckily, we have a place to start working our way out. See here:

http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/inet/ipclassifier.h#169

for receive-ancillary-data infrastructure. We will need to at least one bit for the above socket options, maybe two if we wish to keep them disjoint (though there's no TOS in IPv6, and no TCLASS in IPv4).

While not a bite-sized, that there is this data structure to keep track of ancillary data bits, it might not be a "hard" one either.

Actions #1

Updated by Dan McDonald 11 months ago

  • Subject changed from Add support for IP_RECVTOS and IPV6_RECVTCLASS to Add support for IP_RECVTOS

Changing summary: IPV6_RECVTCLASS is already in illumos.

Actions #2

Updated by Andy Fiddaman 10 months ago

  • Status changed from New to In Progress
  • Assignee set to Andy Fiddaman
Actions #3

Updated by Electric Monk 10 months ago

  • Gerrit CR set to 947
Actions #4

Updated by Andy Fiddaman 10 months ago

Testing notes:

Running the new test programs (32 and 64-bit) results in passes:

% ./recvmsg.64
[PASS] baseline
[PASS] recv TOS
[PASS] recv TTL
[PASS] recv PKTINFO
[PASS] recv TOS,TTL
[PASS] recv TTL,PKTINFO
[PASS] recv TOS,PKTINFO
[PASS] recv TOS,TTL,PKTINFO
[PASS] set TOS,TTL
[PASS] set/recv TOS,TTL
[PASS] set TOS,TTL, recv PKTINFO
[PASS] set TOS,TTL, recv TOS,TTL,PKTINFO
[PASS] STREAM set TOS
[SKIP] STREAM recv TOS - (requires two separate zones)
[SKIP] STREAM set/recv TOS - (requires two separate zones)

The STREAM tests that require two zones were also tested successfully.

I also build ISC bind 9.11 in an ONU boot environment and ran its socket DSCP tests successfully, observing the TOS data being received.

Actions #5

Updated by Electric Monk 10 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 221e47fb90c5fcfe7add9a33f6c915ee5253ece9

commit  221e47fb90c5fcfe7add9a33f6c915ee5253ece9
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2020-10-01T21:28:00.000Z

    13175 Add support for IP_RECVTOS
    13182 CMSG_ macros should have man pages
    Reviewed by: Dan McDonald <danmcd@joyent.com>
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF