Skip to content

Fix: DHCPv6_am returns Reply instead of Solicit for DHCP6_Request #4799

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AbhishekPandey1998
Copy link

Summary

Fixes the bug where DHCPv6_am.make_reply() would return a DHCP6_Solicit message in response to a DHCP6_Request, which violates RFC 8415. The correct behavior is to send a DHCP6_Reply.

Changes

  • Replaced DHCP6_Solicit with DHCP6_Reply in the handler for msgtype == 3
  • Added a test case to verify correct behavior

Closes: #4689

Copy link

codecov bot commented Jul 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.55%. Comparing base (b54fdb7) to head (c70f15c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4799      +/-   ##
==========================================
+ Coverage   80.08%   80.55%   +0.46%     
==========================================
  Files         365      365              
  Lines       89027    89027              
==========================================
+ Hits        71296    71712     +416     
+ Misses      17731    17315     -416     
Files with missing lines Coverage Δ
scapy/layers/dhcp6.py 73.89% <100.00%> (-12.37%) ⬇️

... and 38 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

DHCPv6_am returns a wrong message type in response to a DHCP6_Request
1 participant