dns work

Sascha Hauer s.hauer at pengutronix.de
Sun Apr 15 09:26:14 EDT 2012


The following patches make the dns more universally usable. The
dns code relies on the nameserver and domainname environment variables
being set. The dhcp command correctly sets these variables, but when we
call it from within a script, the variables won't be available from the
parent context. This is solved by adding the nameserver and domainname
to the network device parameters.
Also, tftpfs can now work with hostnames instead of only ip addresses.

Sascha

----------------------------------------------------------------
Sascha Hauer (6):
      net dns: remove debug code
      net: use static string in string_to_ip
      net: add nameserver and domainname to net devices
      dhcp: set global domainname and nameserver
      dns: use global nameserver/domainname
      fs tftp: use resolv to resolv ip address

 fs/tftp.c       |    2 +-
 include/net.h   |    6 +++++-
 lib/parameter.c |    6 +-----
 net/dhcp.c      |   21 ++++++++++++--------
 net/dns.c       |    8 ++++----
 net/eth.c       |    2 ++
 net/net.c       |   59 ++++++++++++++++++++++++++++++++-----------------------
 net/tftp.c      |    3 +--
 8 files changed, 61 insertions(+), 46 deletions(-)



More information about the barebox mailing list