summaryrefslogtreecommitdiffstats
path: root/src/udev/net (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* link : add support to configure Offload features (#4017)Susant Sahani2016-08-305-19/+149
| | | | | | | | | This patch supports these features to be on or off Generic Segmentation Offload TCP Segmentation Offload UDP Segmentation Offload fixes #432
* tree-wide: place #pragma once at the same place everywhereLennart Poettering2016-02-202-4/+4
| | | | | | Usually, we place the #pragma once before the copyright blurb in header files, but in a few cases we didn't. Move those around, so that we do the same thing everywhere.
* Remove/add (un)needed includesNathan McSween2016-02-191-1/+0
|
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-104-8/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* siphash24: change result argument to uint64_tMartin Pitt2015-11-161-3/+3
| | | | | | | | | | | | Change the "out" parameter from uint8_t[8] to uint64_t. On architectures which enforce pointer alignment this fixes crashes when we previously cast an unaligned array to uint64_t*, and on others this should at least improve performance as the compiler now aligns these properly. This also simplifies the code in most cases by getting rid of typecasts. The only place which we can't change is struct duid's en.id, as that is _packed_ and public API, so we can't enforce alignment of the "id" field and have to use memcpy instead.
* util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: move /proc/cmdline parsing code to proc-cmdline.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: move string table stuff into its own string-table.[ch]Lennart Poettering2015-10-272-4/+5
|
* util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering2015-10-251-0/+1
| | | | | There are more than enough to deserve their own .c file, hence move them over.
* util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering2015-10-242-11/+12
| | | | | | | | | | | | | | string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
* document ability to disable MACAddressPolicyJacob Keller2015-10-062-1/+4
| | | | | | | | | | While it is currently possible to either not set MACAddressPolicy or set it to a value different from "persistent" or "random", it is not obvious that a user can do so. Add a policy, "none", which simply retains kernel MAC addresses (same as not filling in the policy at all) and document it so that users are aware of this setting. Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
* tree-wide: drop {} from one-line if blocksLennart Poettering2015-09-091-2/+1
| | | | Patch via coccinelle.
* sd-netlink: rename from sd-rtnlTom Gundersen2015-06-131-4/+4
|
* udev: add some assertsTom Gundersen2015-06-021-0/+4
| | | | Mostly for documentation purposes.
* udev: link-config - fix corruptionTom Gundersen2015-05-212-7/+8
| | | | | | | | The parser used for MTU and Speed expects them to be size_t, not unsigned int. This caused a corruption in the rest of the structure. Reported by David O Neill <david.m.oneill@intel.com>.
* udevd: net - fix leak in .link configTom Gundersen2015-05-161-3/+3
| | | | Path, Driver and Type are now strv rather than strings, so free them properly.
* udev: fix coding styleSusant Sahani2015-05-061-2/+1
|
* shared: add random-util.[ch]Ronny Chevalier2015-04-111-0/+1
|
* fix gcc warnings about uninitialized variablesHarald Hoyer2015-03-271-1/+1
| | | | | | | | | | | | | like: src/shared/install.c: In function ‘unit_file_lookup_state’: src/shared/install.c:1861:16: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized] return r < 0 ? r : state; ^ src/shared/install.c:1796:13: note: ‘r’ was declared here int r; ^
* Use space after a silencing (void)Zbigniew Jędrzejewski-Szmek2015-03-141-1/+1
| | | | | We were using a space more often than not, and this way is codified in CODING_STYLE.
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-232-5/+0
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* net: support globbing and disjunction in Match logicTom Gundersen2015-02-102-8/+8
| | | | Match{Name,OrginalName,Type,Driver,Path} can now take a space-separated glob of matches.
* udev: net_setup - clarify reason for failure of persistent mac address policyTom Gundersen2015-02-061-4/+6
|
* udev: link_config - modernize a bit and fix leakesTom Gundersen2015-01-121-35/+51
| | | | Not all of the link_config struct was getting freed.
* udev: link-config - simplify net-matchTom Gundersen2014-12-081-13/+8
|
* net_setup/networkd: warn if matching is done on possibly unstable ifnameTom Gundersen2014-12-051-12/+33
|
* udev: net_setup - allow matching on OriginalName=Tom Gundersen2014-12-043-3/+15
| | | | | | | | | | | | | | | | | | This has been requested repeatedly, so let's give it a go. We explicitly do not allow matching on names that have already been changed (from a previous udev run, or otherwise), and matching on unpredictable names (ethX) is discouraged (but not currently disallowed). We also currently allow: [Match] Name=veth0 [Link] Name=my-name0 SomeOtherSetting=true Which means that the link file will be applied the first time it is invoked, but not on subsequent invocations, which may be surprising.
* treewide: yet more log_*_errno + return simplificationsMichal Schmidt2014-11-282-20/+10
| | | | | | | | | | | | | Using: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/(if\s*\([^\n]+\))\s*{\n(\s*)(log_[a-z_]*_errno\(\s*([->a-zA-Z_]+)\s*,[^;]+);\s*return\s+\g4;\s+}/\1\n\2return \3;/msg; print;' $f done And a couple of manual whitespace fixups.
* udev,update-done: more log_xyz_errno() conversionsLennart Poettering2014-11-281-7/+6
|
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-282-5/+5
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-282-5/+5
| | | | | | | | | | | | | As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
* util: simplify proc_cmdline() to reuse get_process_cmdline()Lennart Poettering2014-11-071-4/+3
| | | | Also, make all parsing of the kernel cmdline non-fatal.
* s/commandline/command line/gHarald Hoyer2014-11-061-1/+1
|
* shared: rename condition-util.[ch] to condition.[ch]Lennart Poettering2014-11-061-3/+2
| | | | | Now that we only have one file with condition implementations around, we can drop the -util suffix and simplify things a bit.
* udev: link-config: remove unneded linux/netdevice.h includeEmil Renner Berthing2014-09-181-1/+0
|
* udev: net_setup_link - open ethtool and rtnl connections lazilyTom Gundersen2014-09-093-47/+39
|
* udev: link-config - only set *name on successTom Gundersen2014-09-081-2/+2
|
* udev: link-config - fix crash due to missing hwaddrTom Gundersen2014-08-141-1/+2
| | | | Reported by: master.nosferatu@gmail.com
* networkd: link - split out dhcp4 handlingTom Gundersen2014-08-121-8/+15
|
* udev: link-config - fix naming policyTom Gundersen2014-08-121-2/+2
| | | | | | Don't exit the name-finding loop when the 'kernel' policy is detected. We should still find a fallback name if possible in the (very likely) case that no kernel name is set at all.
* udev: link-config - whitespaceTom Gundersen2014-08-121-11/+21
| | | | Don't overflow 80 cols unneccessarily (we are ok with doing it when it improves readability, but that's not the case here).
* udev: link_setup - respect kernel name assign policyTom Gundersen2014-08-082-10/+45
| | | | | | | | | Newer kernels export meta-information about the origin of an ifname. Respect this from the ifname rename logic. We do not rename any interfaces that was originally named by userspace, nor once which have already been renamed from userspace. Moreover, we optionally do not (the default) rename interfaces which the kernel claims to have named in a predictable way.
* Reject invalid quoted stringsZbigniew Jędrzejewski-Szmek2014-07-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | String which ended in an unfinished quote were accepted, potentially with bad memory accesses. Reject anything which ends in a unfished quote, or contains non-whitespace characters right after the closing quote. _FOREACH_WORD now returns the invalid character in *state. But this return value is not checked anywhere yet. Also, make 'word' and 'state' variables const pointers, and rename 'w' to 'word' in various places. Things are easier to read if the same name is used consistently. mbiebl_> am I correct that something like this doesn't work mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"' mbiebl_> systemd seems to strip of the quotes mbiebl_> systemctl status shows mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS $RootDir $MountPoint mbiebl_> which is pretty weird
* Be more careful when checking for empty filesZbigniew Jędrzejewski-Szmek2014-07-171-5/+5
| | | | | If we want to avoid reading a totally empty file, it seems better to check after we have opened the file, not before.
* Let config_parse open file where applicableZbigniew Jędrzejewski-Szmek2014-07-171-4/+3
| | | | | | | | Special care is needed so that we get an error message if the file failed to parse, but not when it is missing. To avoid duplicating the same error check in every caller, add an additional 'warn' boolean to tell config_parse whether a message should be issued. This makes things both shorter and more robust wrt. to error reporting.
* Constify ConfigTableItem tablesZbigniew Jędrzejewski-Szmek2014-07-161-2/+4
|
* udev: link_config - ignore errors due to missing MAC addressTom Gundersen2014-07-071-2/+6
| | | | | | Otherwis, we get misleading error messages on links with MACs. Reported by Leonid Isaev.
* udev: net_setup_link - add a bit more loggingTom Gundersen2014-07-031-2/+8
|