From: Wouter Wijngaards Date: Tue, 7 Apr 2015 07:51:43 +0000 (+0000) Subject: - Libunbound skips dos-line-endings from etc/hosts. X-Git-Tag: release-1.5.4~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11b13d5928a2905f804a34a17493ec40842a6a72;p=thirdparty%2Funbound.git - Libunbound skips dos-line-endings from etc/hosts. git-svn-id: file:///svn/unbound/trunk@3384 be551aaa-1e26-0410-a405-d3ace91eadb9 --- 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;