Development discussion of WireGuard
 help / color / mirror / Atom feed
* [PATCH] handle a network adapter ending in a space character
@ 2023-01-31 11:43 David Leib
  2023-02-07 22:53 ` Jason A. Donenfeld
  0 siblings, 1 reply; 2+ messages in thread
From: David Leib @ 2023-01-31 11:43 UTC (permalink / raw)
  To: wireguard

Due to a bug in a driver, a network adapter had a space character at the end of the name. This patch should allow the script to correctly read the name of the adapter.

---
src/wg-quick/darwin.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wg-quick/darwin.bash b/src/wg-quick/darwin.bash
index 8e46818..b6bb5dc 100755
--- a/src/wg-quick/darwin.bash
+++ b/src/wg-quick/darwin.bash
@@ -220,7 +220,7 @@ declare -A SERVICE_DNS_SEARCH
collect_new_service_dns() {
               local service get_response
               local -A found_services
-              { read -r _ && while read -r service; do
+             { read -r _ && while IFS= read -r service; do
                               [[ $service == "*"* ]] && service="${service:1}"
                               found_services["$service"]=1
                               [[ -n ${SERVICE_DNS["$service"]} ]] && continue
-- 
2.32.0.windows.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] handle a network adapter ending in a space character
  2023-01-31 11:43 [PATCH] handle a network adapter ending in a space character David Leib
@ 2023-02-07 22:53 ` Jason A. Donenfeld
  0 siblings, 0 replies; 2+ messages in thread
From: Jason A. Donenfeld @ 2023-02-07 22:53 UTC (permalink / raw)
  To: David Leib; +Cc: wireguard

Thanks.

Can you send this with a `Signed-off-by:` line like every commit in
that repository does, please? Then I'll apply this.

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-07 23:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31 11:43 [PATCH] handle a network adapter ending in a space character David Leib
2023-02-07 22:53 ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).