summaryrefslogtreecommitdiff
path: root/lib/net_utils.c
AgeCommit message (Collapse)Author
2017-01-14lib: net_utils: enforce '.' as octet separator in string_to_ipChris Packham
Ensure '.' is used to separate octets. If another character is seen reject the string outright and return 0.0.0.0. Signed-off-by: Chris Packham <judge.packham@gmail.com>
2017-01-14lib: net_utils: make string_to_ip stricterChris Packham
Previously values greater than 255 were implicitly truncated. Add some stricter checking to reject addresses with components >255. With the input "1234192.168.1.1" the old behaviour would truncate the address to 192.168.1.1. New behaviour rejects the string outright and returns 0.0.0.0, which for the purposes of IP addresses can be considered an error. Signed-off-by: Chris Packham <judge.packham@gmail.com>
2015-04-18net: cosmetic: Change IPaddr_t to struct in_addrJoe Hershberger
This patch is simply clean-up to make the IPv4 type that is used match what Linux uses. It also attempts to move all variables that are IP addresses use good naming instead of CamelCase. No functional change. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2010-11-28string_to_ip: constify "s" argMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-04-13Rename lib_generic/ to lib/Peter Tyser
Now that the other architecture-specific lib directories have been moved out of the top-level directory there's not much reason to have the '_generic' suffix on the common lib directory. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>