Skip to content

Conversation

@Shubham0699
Copy link

Fixes #20172

Both bailiwicked modules were throwing 'undefined method each for IPAddr' exceptions due to DNS library changes. Fixed by:

  1. Wrapping IPAddr object in array when passing to nameservers parameter

    • Changed nameservers: rr1.address to nameservers: [rr1.address.to_s]
    • Applies to both bailiwicked_domain.rb and bailiwicked_host.rb
  2. Changed SRCPORT default from nil to 0 for automatic port selection

    • Prevents validation errors when running modules
    • 0 is the documented value for automatic port selection

Verification

  • Fixes the NoMethodError exception reported in Bailiwicked module exceptions #20172
  • SRCPORT now uses a valid default value (0) for automatic port selection
  • Code follows the pattern used in other DNS resolver initializations in the codebase

Fixes rapid7#20172

Both bailiwicked modules were throwing 'undefined method each for IPAddr'
exceptions due to DNS library changes. Fixed by:

1. Wrapping IPAddr object in array when passing to nameservers parameter
   - Changed nameservers: rr1.address to nameservers: [rr1.address.to_s]
   - Applies to both bailiwicked_domain.rb and bailiwicked_host.rb

2. Changed SRCPORT default from nil to 0 for automatic port selection
   - Prevents validation errors when running modules
   - 0 is the documented value for automatic port selection
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.

Bailiwicked module exceptions

1 participant