summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-11-25resolved: unify DnsServer handling code between Link and ManagerLennart Poettering
This copies concepts we introduced for the DnsSearchDomain stuff, and reworks the operations on lists of dns servers to be reusable and generic for use both with the Link and the Manager object.
2015-11-25resolved: add a generic DnsSearchDomain conceptLennart Poettering
With this change, we add a new object to resolved, "DnsSearchDomain=" which wraps a search domain. This is then used to introduce a global search domain list, in addition to the existing per-link search domain list which is reword to make use of this new object too. This is preparation for implement proper unicast DNS search domain support.
2015-11-25resolved: make sure order of dns servers is stableLennart Poettering
Previously, we'd keep adding new dns servers we discover to the end of our linked list of servers. When we encountered a pre-existing server, we'd just leave it where it was. In essence that meant that old servers ended up at the front, and new servers at the end, but not in an order that would reflect the configuration. With this change we ensure that every pre-existing server we want to add again we move to the back of the linked list, so that the order is stable and in sync with the requested configuration.
2015-11-25resolved: drop unused enum typeLennart Poettering
2015-11-25resolved: make sure FallbackDNS= overrides built-in servers, doesn't extend themLennart Poettering
Closes #342.
2015-11-25resolved: rework dns server lifecycle logicLennart Poettering
Previously, there was a chance of memory corruption, because when switching to the next DNS server we didn't care whether they linked list of DNS servers was still valid. Clean up lifecycle of the dns server logic: - When a DnsServer object is still in the linked list of DnsServers for a link or the manager, indicate so with a "linked" boolean field, and never follow the linked list if that boolean is not set. - When picking a DnsServer to use for a link ot manager, always explicitly take a reference. This also rearranges some logic, to make the tracking of dns servers by link and globally more alike.
2015-11-25resolved: move dns server picking code from resolved-manager.c to ↵Lennart Poettering
resolved-dns-server.c
2015-11-25resolved: indent less, by exiting earlierLennart Poettering
2015-11-25resolved: split out all code dealing with /etc/resolv.conf into its own .c fileLennart Poettering
No functional changes.
2015-11-25resolved: unify code for parsing dns server informationLennart Poettering
Let's use the same parser when parsing dns server information from /etc/resolv.conf and our native configuration file. Also, move all code that manages lists of dns servers to a single place. resolved-dns-server.c
2015-11-25resolved: /etc/resolved.conf missing is not an errorLennart Poettering
Don't propagate any error in this case, it's really not an error.
2015-11-25dns-domain: remove prototype for function that doesn't existLennart Poettering
2015-11-25man: fix documentation how /etc/resolv.conf is readLennart Poettering
/etc/resolv.conf is only read when the DNS= setting does not appear at all in resolved.conf, regardless if set to the empty list or anything else. Correct that in the man page.
2015-11-25resolved: don't claim DnsQuestion have to have the same namesLennart Poettering
Wen DnsQuestion objects are used for DnsQuery objects all contained keys have to share the same name, but otherwise they generally don't have to, and this can actually happen in real-life because DnsPacket objects for mDNS use DnsQuestion for the question section. Hence, rename: dns_question_is_valid() to dns_question_is_valid_for_query(), since the name uniqueness check it does is only relevant when used for a query. Similar, rename dns_question_name() to dns_question_first_name(), to be more accurate, as this difference matters if we keys don#t have to share the same name.
2015-11-25fstab-gen: post can't be NULLFranck Bui
2015-11-25Merge pull request #2024 from eworm-de/netTom Gundersen
networkd: link - do not drop config for loopback device
2015-11-25networkd: link - do not drop config for loopback deviceChristian Hesse
Commit 5e5b137a (networkd: link - drop foreign config when configuring link) introduced a regression where addresses (including 127.0.0.1) are removed from loopback device. Do not handle loopback device when removing foreign configs. Signed-off-by: Christian Hesse <mail@eworm.de>
2015-11-25tests: don't run tests on incomplete setupEvgeny Vereshchagin
2015-11-25sd-dhcp: parse error message in DECLINE or NAKTom Gundersen
If a client sends a DECLINE or a server sends a NAK, they can include a string with a message to explain the error. Parse this and print it at debug level.
2015-11-25sd-ndisc: better validate RA packetsTom Gundersen
Verify the hoplimit and that the received packet is large enough for the RA header. See <http://tools.ietf.org/html/rfc4861#section-6.1.2>.
2015-11-25sd-ndisc: always send the link-layer addressTom Gundersen
We never send packets without first knowing the link-local L3 address, so we should always include the L2 address in RS packets.
2015-11-25libsystemd-network: clean up recv functionsTom Gundersen
2015-11-25Merge pull request #2027 from evverx/remove-unnecessary-cgroup-systemd-checkingDaniel Mack
tests: remove unnecessary /sys/fs/cgroup/systemd checking
2015-11-25tests: remove unnecessary /sys/fs/cgroup/systemd checkingEvgeny Vereshchagin
A unified hierarchy obsoletes this checking
2015-11-25core: support <soft:hard> ranges for RLIMIT optionsKarel Zak
The new parser supports: <value> - specify both limits to the same value <soft:hard> - specify both limits the size or time specific suffixes are supported, for example LimitRTTIME=1sec LimitAS=4G:16G The patch introduces parse_rlimit_range() and rlim type (size, sec, usec, etc.) specific parsers. No code is duplicated now. The patch also sync docs for DefaultLimitXXX= and LimitXXX=. References: https://github.com/systemd/systemd/issues/1769
2015-11-24Merge pull request #2020 from evverx/signals-completionLennart Poettering
bash-completion: list valid signal names
2015-11-24Merge pull request #2021 from phomes/minor-fixes2Tom Gundersen
resolved: remove unused variable
2015-11-24man: Add a not that mount unit cannot be templatedNicolas Cornu
2015-11-24resolved: remove unused variableThomas Hindoe Paaboel Andersen
2015-11-24bash-completion: list valid signal namesEvgeny Vereshchagin
this is a follow-up for commit 18540892d18addc4dcb81
2015-11-24Merge pull request #1991 from evverx/use-systems-nspawnLennart Poettering
tests: don't rely on system's machined
2015-11-24Merge pull request #2018 from keszybz/kill-signalLennart Poettering
bash-completion: list only valid signal names
2015-11-24bash-completion: list only valid signal namesZbigniew Jędrzejewski-Szmek
Fixup for #1999.
2015-11-24tests: don't rely on system's machinedEvgeny Vereshchagin
Fixes backward/forward incompatibility errors on spawning. For example: $ sudo make run ... Failed to register machine: Cannot set property TasksMax, or unknown property. $ ../../systemd-nspawn --version systemd 228 $ systemd-nspawn --version systemd 225
2015-11-24Merge pull request #1957 from zonque/qemu-testLennart Poettering
test: make QEMU tests work on Semaphore
2015-11-24Merge pull request #1976 from ssahani/word3Lennart Poettering
core: mount flags remove FOREACH_WORD_SEPARATOR
2015-11-24core: Do not bind a mount unit to a device, if it was from mountinfoHarald Hoyer
If a mount unit is bound to a device, systemd tries to umount the mount point, if it thinks the device has gone away. Due to the uevent queue and inotify of /proc/self/mountinfo being two different sources, systemd can never get the ordering reliably correct. It can happen, that in the uevent queue ADD,REMOVE,ADD is queued and an inotify of mountinfo (or libmount event) happend with the device in question. systemd cannot know, at which point of time the mount happend in the ADD,REMOVE,ADD sequence. The real ordering might have been ADD,REMOVE,ADD,mount and systemd might think ADD,mount,REMOVE,ADD and would umount the mountpoint. A test script which triggered this behaviour is: rm -f test-efi-disk.img dd if=/dev/null of=test-efi-disk.img bs=1M seek=512 count=1 parted --script test-efi-disk.img \ "mklabel gpt" \ "mkpart ESP fat32 1MiB 511MiB" \ "set 1 boot on" LOOP=$(losetup --show -f -P test-efi-disk.img) udevadm settle mkfs.vfat -F32 ${LOOP}p1 mkdir -p mnt mount ${LOOP}p1 mnt ... <dostuffwith mnt> Without the "udevadm settle" systemd unmounted mnt while the script was operating on mnt. Of course the question is, why there was a REMOVE in the first place, but this is not part of this patch.
2015-11-24Merge pull request #2013 from martinpitt/statfs-typeLennart Poettering
basic: fix build on architectures with small long
2015-11-24basic: fix build on architectures with small longHelmut Grohne
The x32 architecture has a small "long" type which is not enough to hold struct statfs.f_type.
2015-11-24core: mount flags remove FOREACH_WORD_SEPARATORSusant Sahani
FOREACH_WORD_SEPARATOR is no need here since we only apply only one mount flag. The rvalue is sufficient for this.
2015-11-24Merge pull request #2011 from poettering/resolve-dnameTom Gundersen
Implement client-side DNAME RR resolving
2015-11-24update TODOLennart Poettering
2015-11-24resolved: implement client-side DNAME resolutionLennart Poettering
Most servers apparently always implicitly convert DNAME to CNAME, but some servers don't, hence implement this properly, as this is required by edns0.
2015-11-24question: drop dns_question_is_superset() which we don't use anymoreLennart Poettering
2015-11-23Merge pull request #1984 from phomes/networkd-routes-parseTom Gundersen
networkd: link - fix reading routes
2015-11-23Merge pull request #2007 from poettering/resolve-srvTom Gundersen
resolved: add support for resolving plain SRV and DNS-SD services
2015-11-23resolved: add ResolveService() bus call for resolving SRV and DNS-SD servicesLennart Poettering
This also adds client-side support for this to systemd-resolve-host. Note that the ResolveService() API can deal both with DNS-SD service (consisting of service name, type and domain), as well as classic SRV services (consisting just of a type and a domain), all exposed in the same call. This patch also reworks CNAME handling in order to reuse it between hostname, RR and service lookups. In contrast to Avahi and Bonjour, this new API will actually reolve the A/AAAA RRs the SRV RRs point to in one go (unless this is explicitly disabled). This normally comes for free, as these RRs are sent along the SRV responses anyway, hence let's make use of that. This makes the API considerably easier to use, as a single ResolveService() invocation will return all necessary data to pick a server and connect() to it. Note that this only implements the DNS-SD resolving step, it does not implement DNS-SD browsing, as that makes sense primarily on mDNS, due to its continuous nature.
2015-11-23resolved: fix minor memory leak when shuttin downLennart Poettering
We need to free the rtnl watch too.
2015-11-23dns-domain: add calls to join/split SRV/DNS-SD service domainsLennart Poettering
This adds dns_service_join() and dns_service_split() which may be used to concatenate a DNS-SD service name, am SRV service type string, and a domain name into a full resolvable DNS domain name string. If the service name is specified as NULL, only the type and domain are appended, to implement classic, non-DNS-SD SRV lookups. The reverse is dns_service_split() which takes the full name, and split it into the three components again.
2015-11-23escape: add cescape_length() call as generalization of cescape()Lennart Poettering