Skip to content

fix(dns): better ip resolution#2487

Merged
onur-ozkan merged 2 commits intodevfrom
better-hostname-resolution
Jun 12, 2025
Merged

fix(dns): better ip resolution#2487
onur-ozkan merged 2 commits intodevfrom
better-hostname-resolution

Conversation

@onur-ozkan
Copy link
Copy Markdown

Currently, KDF expects the first result of the IP resolution to be an IPv4 address as it does not support IPv6 addresses. This assumption can cause a problem if the first result is an IPv6 address which makes KDF to panic on startup. With this patch, instead of immediately failing on the first IPv6 result, KDF now iterates through all results and only fails if no IPv4 address is found.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan onur-ozkan force-pushed the better-hostname-resolution branch from 067c2a4 to 9fdf0d1 Compare June 11, 2025 08:17
Comment on lines 177 to 178
#[display(fmt = "Address/Seed {} to_socket_addrs empty iter", _0)]
EmptyIterator(String),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this error variant could be remove now i guess

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, with a bit of update on UnresolvedAddress, we can remove this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reorganized error handling: ae46898

Signed-off-by: onur-ozkan <work@onurozkan.dev>
@smk762 smk762 self-requested a review June 11, 2025 12:02
Copy link
Copy Markdown

@smk762 smk762 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed functional on Android at GLEECBTC/gleec-wallet#2764
Thanks for the quick fix!

Copy link
Copy Markdown
Collaborator

@dimxy dimxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@onur-ozkan onur-ozkan merged commit 116840b into dev Jun 12, 2025
22 of 24 checks passed
@onur-ozkan onur-ozkan deleted the better-hostname-resolution branch June 12, 2025 03:21
dimxy pushed a commit to dimxy/komodo-defi-framework that referenced this pull request Jun 27, 2025
* dev: (30 commits)
  chore(core): replace hash_raw_entry with stable entry() API (GLEECBTC#2473)
  chore(core): adapt `MmError` and usages for compatibility with new rustc versions (GLEECBTC#2443)
  feat(wallet): add `delete_wallet` RPC (GLEECBTC#2497)
  chore(release): add changelog entries for v2.5.0-beta (GLEECBTC#2494)
  chore(release): bump kdf version to 2.5.0-beta (GLEECBTC#2492)
  feat(tests): zcoin unit test to validate dex fee (GLEECBTC#2460)
  fix(zcoin): correctly track unconfirmed z-coin notes (GLEECBTC#2331)
  improvement(orders): remove BTC specific volume from min_trading_vol logic (GLEECBTC#2483)
  feat(ibc-routing-part-2): supporting entire Cosmos network for swaps (GLEECBTC#2476)
  fix(startup): don't initialize WalletConnect during startup (GLEECBTC#2485)
  fix(dns): better ip resolution (GLEECBTC#2487)
  improvement(event-streaming): strong type streamer IDs (GLEECBTC#2441)
  bump timed-map to `1.4.1` (GLEECBTC#2481)
  improvement(RPC): unified interface for legacy and current RPC interfaces (GLEECBTC#2450)
  improvement(tendermint): `tendermint_tx_internal_id` helper (GLEECBTC#2438)
  feat(walletconnect): add WalletConnect v2 support for EVM and Cosmos (GLEECBTC#2223)
  feat(ibc-routing-part-1): supporting entire Cosmos network for swaps (GLEECBTC#2459)
  fix(test): fix HD Wallet message signing tests (GLEECBTC#2474)
  improvement(builds): enable static CRT linking for MSVC builds (GLEECBTC#2464)
  feat(wallet): implement HD multi-address support for message signing (GLEECBTC#2432)
  ...

# Conflicts:
#	mm2src/coins/qrc20.rs
#	mm2src/mm2_main/src/lp_swap/maker_swap.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants