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

Merged
merged 2 commits into from
Jul 30, 2025

Conversation

AbhishekPandey1998
Copy link
Contributor

@AbhishekPandey1998 AbhishekPandey1998 commented Jul 19, 2025

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
  • Fixed the 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.08%. Comparing base (b54fdb7) to head (af5a9bc).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4799   +/-   ##
=======================================
  Coverage   80.08%   80.08%           
=======================================
  Files         365      365           
  Lines       89027    89027           
=======================================
  Hits        71296    71296           
  Misses      17731    17731           
Files with missing lines Coverage Δ
scapy/layers/dhcp6.py 86.25% <100.00%> (ø)

... and 3 files with indirect coverage changes

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

Copy link
Member

@gpotter2 gpotter2 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 the PR !

@gpotter2 gpotter2 merged commit 5744d95 into secdev:master Jul 30, 2025
20 of 23 checks passed
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
2 participants