Strip newline from the gateway correctly.
This commit is contained in:
parent
e7458201e4
commit
2787059b04
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: net.c,v 1.11 2014/09/13 01:11:58 roy Exp $ */
|
||||
/* $NetBSD: net.c,v 1.12 2014/09/13 09:30:30 roy Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -626,7 +626,7 @@ again:
|
|||
strlcpy(net_defroute, textbuf,
|
||||
sizeof net_defroute);
|
||||
free(textbuf);
|
||||
if ((nl = strchr(net_namesvr, '\n')))
|
||||
if ((nl = strchr(net_defroute, '\n')))
|
||||
*nl = '\0';
|
||||
|
||||
/* pull nameserver info out of /etc/resolv.conf */
|
||||
|
|
Loading…
Reference in New Issue