summaryrefslogtreecommitdiff
path: root/lib/net_utils.c
Commit message (Collapse)AuthorAgeLines
* lib: net_utils: enforce '.' as octet separator in string_to_ipChris Packham2017-01-14-0/+4
| | | | | | | 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>
* lib: net_utils: make string_to_ip stricterChris Packham2017-01-14-0/+4
| | | | | | | | | | | | 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>
* net: cosmetic: Change IPaddr_t to struct in_addrJoe Hershberger2015-04-18-7/+9
| | | | | | | | | 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>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* string_to_ip: constify "s" argMike Frysinger2010-11-28-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Rename lib_generic/ to lib/Peter Tyser2010-04-13-0/+50
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>