summaryrefslogtreecommitdiff
path: root/src/basic/in-addr-util.c
AgeCommit message (Collapse)Author
2016-11-21basic: make sure in_addr_from_string() can take NULL argumentsLennart Poettering
This way, we can use it for validating IP address strings.
2016-11-21basic: add explicit ipv4-specific in_addr classification callsLennart Poettering
This adds in4_addr_is_localhost() and in4_addr_is_link_local() that only take an IPv4 "struct in_addr", to match in_addr_is_localhost() and in_addr_is_link_local() that that a "union in_addr_union". This matches the existing in4_addr_is_null() call that already exists. For IPv6 glibc already exports a set of macros, hence we don't add similar functions in6_addr_is_localhost(). We also drop in6_addr_is_null() as IN6_IS_ADDR_UNSPECIFIED() already provides that.
2016-06-09Merge pull request #3432 from poettering/resolved-ll-ipv6Martin Pitt
resolved: support IPv6 DNS servers on the local link
2016-06-06util: make it easier to check whether in_addr or in6_addr addresses are NULLLennart Poettering
2016-06-06resolved: support IPv6 DNS servers on the local linkLennart Poettering
Make sure we can parse DNS server addresses that use the "zone id" syntax for local link addresses, i.e. "fe80::c256:27ff:febb:12f%wlp3s0", when reading /etc/resolv.conf. Also make sure we spit this out correctly again when writing /etc/resolv.conf and via the bus. Fixes: #3359
2016-02-10tree-wide: remove Emacs lines from all filesDaniel Mack
This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
2016-01-13tree-wide: check if errno is greater then zeroZbigniew Jędrzejewski-Szmek
gcc is confused by the common idiom of return errno ? -errno : -ESOMETHING and thinks a positive value may be returned. Replace this condition with errno > 0 to help gcc and avoid many spurious warnings. I filed a gcc rfe a long time ago, but it hard to say if it will ever be implemented [1]. Both conventions were used in the codebase, this change makes things more consistent. This is a follow up to bcb161b0230f. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61846
2015-11-30basic: include only what we useThomas Hindoe Paaboel Andersen
This is a cleaned up result of running iwyu but without forward declarations on src/basic.
2015-11-27resolved: fix typo in in_addr_is_localhost()Mantas MikulÄ—nas
2015-11-27resolved: never cache RRs originating from localhostLennart Poettering
After all, this is likely a local DNS forwarder that caches anyway, hence there's no point in caching twice. Fixes #2038.
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-06-11build-sys: split internal basic/ library from shared/Kay Sievers
basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/