From 11b13d5928a2905f804a34a17493ec40842a6a72 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Tue, 7 Apr 2015 07:51:43 +0000 Subject: [PATCH] - Libunbound skips dos-line-endings from etc/hosts. git-svn-id: file:///svn/unbound/trunk@3384 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 3 +++ libunbound/libunbound.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index 3989bfcfc..cfde10135 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +7 April 2015: Wouter + - Libunbound skips dos-line-endings from etc/hosts. + 2 April 2015: Wouter - Fix #660: Fix interface-automatic broken in the presence of asymmetric routing. diff --git a/libunbound/libunbound.c b/libunbound/libunbound.c index eff27de1a..546fb5ddf 100644 --- a/libunbound/libunbound.c +++ b/libunbound/libunbound.c @@ -1066,7 +1066,8 @@ ub_ctx_hosts(struct ub_ctx* ctx, const char* fname) *parse++ = 0; /* end delimiter for addr ... */ /* go to names and add them */ while(*parse) { - while(*parse == ' ' || *parse == '\t' || *parse=='\n') + while(*parse == ' ' || *parse == '\t' || *parse=='\n' + || *parse=='\r') parse++; if(*parse == 0 || *parse == '#') break; -- 2.47.2