[PR #1520] [MERGED] Fix/resolv parser #15501

Open
opened 2026-08-05 03:07:48 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1520
Author: @pappz
Created: 2/2/2024
Status: Merged
Merged: 2/2/2024
Merged by: @mlsmaycon

Base: mainHead: fix/resolv-parser


📝 Commits (3)

📊 Changes

4 files changed (+123 additions, -45 deletions)

View changed files

📝 client/internal/dns/file_parser_linux.go (+9 -9)
📝 client/internal/dns/file_parser_linux_test.go (+54 -29)
📝 client/internal/dns/file_repair_linux.go (+15 -7)
📝 client/internal/dns/file_repair_linux_test.go (+45 -0)

📄 Description

Describe your changes

In case if the original resolv.conf file is empty then it can cause nil pointer

closes #1521

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/1520 **Author:** [@pappz](https://github.com/pappz) **Created:** 2/2/2024 **Status:** ✅ Merged **Merged:** 2/2/2024 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `fix/resolv-parser` --- ### 📝 Commits (3) - [`2d5fa40`](https://github.com/netbirdio/netbird/commit/2d5fa4006520706d278cbd820e728cc7bd5041d7) Fix empty resolv.conf parsing - [`546d7e4`](https://github.com/netbirdio/netbird/commit/546d7e4c6fbc44d7291f8c2554233b8b4759bccd) Fix tests - [`ad99b72`](https://github.com/netbirdio/netbird/commit/ad99b72c14a112574c5446ffdfa59d4f9d6bd7d8) Follow symlink recursively ### 📊 Changes **4 files changed** (+123 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/dns/file_parser_linux.go` (+9 -9) 📝 `client/internal/dns/file_parser_linux_test.go` (+54 -29) 📝 `client/internal/dns/file_repair_linux.go` (+15 -7) 📝 `client/internal/dns/file_repair_linux_test.go` (+45 -0) </details> ### 📄 Description ## Describe your changes In case if the original resolv.conf file is empty then it can cause nil pointer ## Issue ticket number and link closes #1521 ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 03:07:48 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#15501