Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DHCPv4] add the IPv6-Only Preferred Option #4108

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

evverx
Copy link
Contributor

@evverx evverx commented Sep 1, 2023

https://datatracker.ietf.org/doc/html/rfc8925#name-option-format

3.1.  Option Format

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Code      |   Length      |           Value               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |         Value (cont.)         |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Figure 1: IPv6-Only Preferred Option Format

   Fields:

   Code:  8-bit identifier of the IPv6-Only Preferred option code as
      assigned by IANA: 108.

   Length:  8-bit unsigned integer.  The length of the option, excluding
      the Code and Length Fields.  The server MUST set the length field
      to 4.

   Value:  32-bit unsigned integer.  The number of seconds for which the
      client should disable DHCPv4 (V6ONLY_WAIT configuration variable).

The patch was also cross-checked with Wireshark:

    Option: (108) IPv6-Only Preferred
        Length: 4
        Value: ffffffff

https://datatracker.ietf.org/doc/html/rfc8925#name-option-format

3.1.  Option Format

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Code      |   Length      |           Value               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |         Value (cont.)         |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Figure 1: IPv6-Only Preferred Option Format

   Fields:

   Code:  8-bit identifier of the IPv6-Only Preferred option code as
      assigned by IANA: 108.

   Length:  8-bit unsigned integer.  The length of the option, excluding
      the Code and Length Fields.  The server MUST set the length field
      to 4.

   Value:  32-bit unsigned integer.  The number of seconds for which the
      client should disable DHCPv4 (V6ONLY_WAIT configuration variable).

The patch was also cross-checked with Wireshark:

    Option: (108) IPv6-Only Preferred
        Length: 4
        Value: ffffffff
@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Merging #4108 (17226d9) into master (c57c02b) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4108      +/-   ##
==========================================
- Coverage   81.98%   81.98%   -0.01%     
==========================================
  Files         328      328              
  Lines       76027    76027              
==========================================
- Hits        62333    62328       -5     
- Misses      13694    13699       +5     
Files Changed Coverage Δ
scapy/layers/dhcp.py 82.41% <ø> (-1.63%) ⬇️

... and 8 files with indirect coverage changes

Copy link
Member

@guedou guedou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR!

@guedou guedou merged commit dca28dc into secdev:master Sep 2, 2023
18 checks passed
@gpotter2 gpotter2 added this to the 2.6.0 milestone Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants