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

Fallback to IPv6 default routes for network interface detection #4321

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guedou
Copy link
Member

@guedou guedou commented Mar 16, 2024

Fixes #4312 and #4304.

To maintainers: shoud I add unit tests?

Copy link

codecov bot commented Mar 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.52%. Comparing base (ac3d5bb) to head (478cb0c).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4321      +/-   ##
==========================================
- Coverage   82.20%   81.52%   -0.68%     
==========================================
  Files         353      353              
  Lines       83529    83655     +126     
==========================================
- Hits        68662    68202     -460     
- Misses      14867    15453     +586     
Files Coverage Δ
scapy/interfaces.py 96.80% <100.00%> (+0.20%) ⬆️

... and 22 files with indirect coverage changes

@guedou guedou force-pushed the guedou/20240316/ipv6_iface branch 2 times, most recently from c2745fc to 0087680 Compare March 16, 2024 12:18
@gpotter2
Copy link
Member

I would argue this needs tests considering it's already a regression.

Also you need to rebase ;p

@guedou guedou force-pushed the guedou/20240316/ipv6_iface branch 2 times, most recently from c21e446 to 425690a Compare March 19, 2024 19:43
@gpotter2
Copy link
Member

This makes me kinda wonder why we deprecated conf.iface6.

@guedou
Copy link
Member Author

guedou commented Mar 23, 2024 via email

@guedou guedou force-pushed the guedou/20240316/ipv6_iface branch from 425690a to 4447e20 Compare April 30, 2024 09:19
@guedou guedou added this to the 2.6.0 milestone Apr 30, 2024
@guedou guedou force-pushed the guedou/20240316/ipv6_iface branch 18 times, most recently from 5e88e8b to c1d43f4 Compare May 1, 2024 20:07
@guedou guedou force-pushed the guedou/20240316/ipv6_iface branch from c1d43f4 to 478cb0c Compare May 1, 2024 20:15
@oskar456
Copy link

oskar456 commented May 7, 2024

Hey, I only noticed this after I opened my own PR #4380.
According to my tests, it is not going to work because conf.route6 is not populated by the time get_working_if() is called. This can be fixed by calling conf.ifaces.reload() at the end of route6.py.
Also I think it would be better to consider only default or generic enough routes. When someone has for instance an IPv6-only machine with a VPN that pushes route say 10.0.0.0/8, then the interface with IPv6 default route should be preferred over the VPN interface with /8 IPv4 route.

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.

IPv6 source address selection regression
3 participants