Skip to content

arch: import read_nameservers on illumos-based systems too#5030

Merged
gpotter2 merged 1 commit into
secdev:masterfrom
evverx:illumos-read-nameservers
Jul 1, 2026
Merged

arch: import read_nameservers on illumos-based systems too#5030
gpotter2 merged 1 commit into
secdev:masterfrom
evverx:illumos-read-nameservers

Conversation

@evverx

@evverx evverx commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

to prevent it from failing there with:

  ...
    from scapy.all import *
  File "/root/scapy/scapy/all.py", line 16, in <module>
    from scapy.arch import *
AttributeError: module 'scapy.arch' has no attribute 'read_nameservers'

With this patch applied run_scapy no longer fails and dns_resolve works as expected:

>>> sys.platform
'sunos5'
>>> dns_resolve('example.com')
[<DNSRR  rrname=b'example.com.' type=A cacheflush=0 rclass=IN ttl=174 rdata=8.47.69.4 |>,
 <DNSRR  rrname=b'example.com.' type=A cacheflush=0 rclass=IN ttl=174 rdata=8.6.112.4 |>]

F403 isn't needed there (it was probably copied from the next line) so it was removed to avoid hitting E501 line too long (89 > 88 characters).

It's a follow-up to 528626a

AI-Assisted: no

to prevent it from failing there with:
```
  ...
    from scapy.all import *
  File "/root/scapy/scapy/all.py", line 16, in <module>
    from scapy.arch import *
AttributeError: module 'scapy.arch' has no attribute 'read_nameservers'
```

With this patch applied run_scapy no longer fails and dns_resolve works
as expected:
```
>>> sys.platform
'sunos5'
>>> dns_resolve('example.com')
[<DNSRR  rrname=b'example.com.' type=A cacheflush=0 rclass=IN ttl=174 rdata=8.47.69.4 |>,
 <DNSRR  rrname=b'example.com.' type=A cacheflush=0 rclass=IN ttl=174 rdata=8.6.112.4 |>]
```

F403 isn't needed there (it was probably copied from the next line) so
it was removed to avoid hitting E501 line too long (89 > 88 characters).

It's a follow-up to 528626a

AI-Assisted: no
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 80.30%. Comparing base (5f271b5) to head (350b9f4).

Files with missing lines Patch % Lines
scapy/arch/solaris.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5030      +/-   ##
==========================================
- Coverage   80.30%   80.30%   -0.01%     
==========================================
  Files         386      386              
  Lines       96127    96127              
==========================================
- Hits        77192    77191       -1     
- Misses      18935    18936       +1     
Files with missing lines Coverage Δ
scapy/arch/solaris.py 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

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

@gpotter2 gpotter2 left a comment

Copy link
Copy Markdown
Member

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 fda6032 into secdev:master Jul 1, 2026
23 of 25 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.

2 participants