b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
dbe81cbd2a93088236a2e4e41eeb33378940f7b9 |
|
16-Nov-2015 |
Martin Pitt <martin.pitt@ubuntu.com> |
siphash24: change result argument to uint64_t
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. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
4e731273edfe852a3eee2949cd20f49fd5b4f6d7 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move /proc/cmdline parsing code to proc-cmdline.[ch] |
8b43440b7ef4b81c69c31de7ff820dc07a780254 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move string table stuff into its own string-table.[ch] |
8fcde01280adcbd07e8205b91ac52b06305b6208 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch] |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
07630cea1f3a845c09309f197ac7c4f11edd3b62 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split our string related calls from util.[ch] into its own file 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. |
66d3752e812915a549ebee01769ee761c1495667 |
|
06-Oct-2015 |
Jacob Keller <jacob.keller@gmail.com> |
document ability to disable MACAddressPolicy
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> |
1c4baffc1895809bae9ac36b670af90a4cb9cd7d |
|
13-Jun-2015 |
Tom Gundersen <teg@jklm.no> |
sd-netlink: rename from sd-rtnl |
3b64e4d4f40baac56148c7d333d6a0053358ec7a |
|
02-Jun-2015 |
Tom Gundersen <teg@jklm.no> |
udev: add some asserts
Mostly for documentation purposes. |
dab495dc23bf9a5ba0487a057bb594355555a0e9 |
|
21-May-2015 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - fix corruption
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>. |
43d60b77a83b3185e37c65c4f2649d24c227c7f0 |
|
16-May-2015 |
Tom Gundersen <teg@jklm.no> |
udevd: net - fix leak in .link config
Path, Driver and Type are now strv rather than strings, so free them properly. |
3df3e884ae1237ef0d4d23b0e80f4ffda95ac135 |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add random-util.[ch] |
a7f7d1bde43fc825c49afea3f946f5b4b3d563e0 |
|
27-Mar-2015 |
Harald Hoyer <harald@redhat.com> |
fix gcc warnings about uninitialized variables
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;
^ |
dc75168823540076b354135f6e2de7a9a978fbca |
|
14-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use space after a silencing (void)
We were using a space more often than not, and this way is
codified in CODING_STYLE. |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
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. |
1c25683e0f40c6169676cc44fa1897082597feec |
|
06-Feb-2015 |
Tom Gundersen <teg@jklm.no> |
udev: net_setup - clarify reason for failure of persistent mac address policy |
9a4b012e43f23516373bf398dd9a458439d19939 |
|
12-Jan-2015 |
Tom Gundersen <teg@jklm.no> |
udev: link_config - modernize a bit and fix leakes
Not all of the link_config struct was getting freed. |
ca6038b89645c0c1bd547d6a420bf95eb3d6f4cc |
|
08-Dec-2014 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - simplify net-match |
32bc8adcd836baff68e4d0f53b9a382f358cccf8 |
|
05-Dec-2014 |
Tom Gundersen <teg@jklm.no> |
net_setup/networkd: warn if matching is done on possibly unstable ifname |
7eb08da4b388b920c8a894b1500c9cc7dc1f31ef |
|
04-Dec-2014 |
Tom Gundersen <teg@jklm.no> |
udev: net_setup - allow matching on OriginalName=
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. |
f647962d64e844689f3e2acfce6102fc47e76df2 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: yet more log_*_errno + return simplifications
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. |
755bde375f4db393ad06e73340bfcf4d0cf91bb2 |
|
28-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
udev,update-done: more log_xyz_errno() conversions |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
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(). |
b5884878a2874447b2a9f07f324a7cd909d96d48 |
|
07-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
util: simplify proc_cmdline() to reuse get_process_cmdline()
Also, make all parsing of the kernel cmdline non-fatal. |
3f85ef0f05ffc51e19f86fb83a1c51e8e3cd6817 |
|
06-Nov-2014 |
Harald Hoyer <harald@redhat.com> |
s/commandline/command line/g |
58c9846d32e55799b6e4607136a34e2727c919ac |
|
18-Sep-2014 |
Emil Renner Berthing <systemd@esmil.dk> |
udev: link-config: remove unneded linux/netdevice.h include |
aedca89268ed4fd6be41e55a605f011033ad1fb5 |
|
09-Sep-2014 |
Tom Gundersen <teg@jklm.no> |
udev: net_setup_link - open ethtool and rtnl connections lazily |
d95b83b87d7d7c50e550f7128827f73a321c8934 |
|
08-Sep-2014 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - only set *name on success |
eb7040ec50fbfe5aad9eaf305bd442a4a235abaa |
|
14-Aug-2014 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - fix crash due to missing hwaddr
Reported by: master.nosferatu@gmail.com |
3c9b886068d99e5d3cbabcac32a4decf37244c54 |
|
12-Aug-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: link - split out dhcp4 handling |
68ba38770640413b4fa06773447666eb88a38d4c |
|
12-Aug-2014 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - fix naming policy
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. |
464cf22f17e0cf2d8bfa6d72b5e7a662d634f149 |
|
12-Aug-2014 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - whitespace
Don't overflow 80 cols unneccessarily (we are ok with doing it when it improves readability, but that's not the case here). |
04b67d49254d956d31bcfe80340fb9df7ed332d3 |
|
08-Aug-2014 |
Tom Gundersen <teg@jklm.no> |
udev: link_setup - respect kernel name assign policy
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. |
a2a5291b3f5ab6ed4c92f51d0fd10a03047380d8 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Reject invalid quoted strings
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 |
ed88bcfb7c15029f9fc95ee2380759a9eb782d46 |
|
17-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Be more careful when checking for empty files
If we want to avoid reading a totally empty file, it seems better
to check after we have opened the file, not before. |
36f822c4bd077f9121757e24b6516e5c7ada63b5 |
|
17-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Let config_parse open file where applicable
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. |
e9f3d2d508bfd9fb5b54e82994bda365a71eb864 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Constify ConfigTableItem tables |
a669ea9860900d5cdebbc4cb9aaea72db7e28a02 |
|
07-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
udev: link_config - ignore errors due to missing MAC address
Otherwis, we get misleading error messages on links with MACs.
Reported by Leonid Isaev. |
866ee3682213789f85b877700457fdca05695a0e |
|
03-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
udev: net_setup_link - add a bit more logging |
f8a0bb5285024b6ce372c3157e761e6543ebdcd2 |
|
13-Jun-2014 |
Andreas Henriksson <andreas@fatal.se> |
udev: fix invalid free() in enable_name_policy()
static bool enable_name_policy(...) in ./src/udev/net/link-config.c
calls proc_cmdline(...) to get "line" initialized, but
proc_cmdline(...) does not guarantee that atleast when both
conditions (detect_container(NULL) > 0) and
read_full_file(...) returned < 0. |
edf029b7fd9a5853a87d3ca99aac2922bb8a277e |
|
04-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - fix mem leak
Reported by Kay. |
6e37cd2f4af8928d905203108a4331e375d7127c |
|
21-Apr-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
silence warnings |
92d927f850d4b668b44f3e5f41e266d934d03726 |
|
20-Apr-2014 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - treat any non-random mac address as persistent
The address may be already changed by other processes, or set
when creating the netdev from userspace. |
6916ec29afd488d91e7e0fcbcc2e006b4e5f28df |
|
19-Apr-2014 |
Tom Gundersen <teg@jklm.no> |
network: implement masking of .link, .network and .netdev files |
505f8da7325591defe5f751f328bd26915267602 |
|
19-Apr-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: tie links to rtnl rather than udev
This essentially swaps the roles of rtnl and udev in networkd. After this
change libudev is only used for waiting for udev to initialize devices and
to get udev-specific information needed for some [Match] attributes.
This in particular simplifies the code in containers where udev is not really
useful, but also simplifies things and reduces round-trips in the non-container
case. |
ecb08ec6a5c52f2d940f3b8147e2a480affd46e1 |
|
05-Apr-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Fix a few return codes in error paths |
c6f7c917a1b494d4455800823472227463f87438 |
|
21-Mar-2014 |
Tom Gundersen <teg@jklm.no> |
libsystemd-network: move network-utils from src/shared
This does not belong in shared as it is mostly a detail of our networking subsystem.
Moreover, now we can use libudev here, which will simplify things. |
b5db00e52ee2e20578839e4e4488f7b9af9abc38 |
|
21-Mar-2014 |
Umut Tezduyar Lindskog <umut.tezduyar@axis.com> |
sd-ipv4ll/networkd: generate predictable addresses
Increase the chance of using the same link local address between reboots. The
pseudo random sequence of addresses we attempt is now seeded with data that is
very likely to stay the same between reboots, but at the same time be unique
to the specific machine/nic.
First we try to use the ID_NET_NAME_* data from the udev db combined with the
machin-id, which is guaranteed to be unique and persistent, if available. If
that is not possible (e.g., in containers where we don't have access to the
udev db) we fallback to using the MAC address of the interface, which is
guaranteed to be unique, and likely to be persistent.
[tomegun: three minor changes:
- don't expose HASH_KEY in the siphash24 header
- get rid of some compile-warnings (and some casts at the same time),
by using uint8_t[8] rather than uint64_t in the api
- added commit message] |
03e334a1c7dc8c20c38902aa039440763acc9b17 |
|
18-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
util: replace close_nointr_nofail() by a more useful safe_close()
safe_close() automatically becomes a NOP when a negative fd is passed,
and returns -1 unconditionally. This makes it easy to write lines like
this:
fd = safe_close(fd);
Which will close an fd if it is open, and reset the fd variable
correctly.
By making use of this new scheme we can drop a > 200 lines of code that
was required to test for non-negative fds or to reset the closed fd
variable afterwards. |
2c5859afecee81e345fc9526b1083bf79990ffb8 |
|
07-Mar-2014 |
Daniel Mack <zonque@gmail.com> |
Make tables for DEFINE_STRING_TABLE_LOOKUP consistent
Bring some arrays that are used for DEFINE_STRING_TABLE_LOOKUP() in the
same order than the enums they reference.
Also, pass the corresponding _MAX value to the array initalizer where
appropriate. |
733f7a2c69c794a81978a08a79916c224ba355a6 |
|
22-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
udev: net - allow MTU and Speed to be specified with units
This also changes the names to MTUBytes and BitsPerSecond, respectively. Notice
that the speed was mistakenly documented to be in bytes before this change. |
bf175aafd20c9ef974709ef12c5acf836121af33 |
|
21-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
net-util: match on the driver as exposed by ethtool if DRIVER not set
Also fix a copy-paste error that broke matching on interface name. |
847a8a5fed4d265dfa659917515c6f9bd1b8d5c4 |
|
21-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
udev - link-setup - expose ID_NET_DRIVER
This is the same as shown by 'ethtool -i <ifname>', and is sometimes
set even though DRIVER is not. |
edbb03e95a3c31bf719d5c6c46eec14d0bcb9c8f |
|
21-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
.network/.netdev/.link: allow to match on architecture |
2cc412b59353576cece2d5b30c6a39c70552f0a0 |
|
20-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
network/link: Match - filter on kernel cmdline, host and virt |
151b9b9662a90455262ce575a8a8ae74bf4ff336 |
|
20-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
api: in constructor function calls, always put the returned object pointer first (or second)
Previously the returned object of constructor functions where sometimes
returned as last, sometimes as first and sometimes as second parameter.
Let's clean this up a bit. Here are the new rules:
1. The object the new object is derived from is put first, if there is any
2. The object we are creating will be returned in the next arguments
3. This is followed by any additional arguments
Rationale:
For functions that operate on an object we always put that object first.
Constructors should probably not be too different in this regard. Also,
if the additional parameters might want to use varargs which suggests to
put them last.
Note that this new scheme only applies to constructor functions, not to
all other functions. We do give a lot of freedom for those.
Note that this commit only changes the order of the new functions we
added, for old ones we accept the wrong order and leave it like that. |
e51660ae56bb747ece2cab8fe6eec37f4d06a438 |
|
19-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
udev: net-config - allow interface names to be set from the hwdb |
9b1c2626cef16722603bded9bb52033aba34dd74 |
|
18-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
net-match: fix Driver= match
It should match on the driver of the parent device. |
2ad8416dd057e7e3185169609ca3006e7649f576 |
|
09-Jan-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
No need to canonicalize fixed paths |
9f6445e34a57c270f013c9416c123e56261553dd |
|
24-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
log: log_error() and friends add a newline after each line anyway, so avoid including it in the log strings |
9bf3b53533cdc9b95c921b71da755401f223f765 |
|
22-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
shared: switch our hash table implementation over to SipHash
SipHash appears to be the new gold standard for hashing smaller strings
for hashtables these days, so let's make use of it. |
187dc6e554f2d5b4b5a3bee72c73ff5df6418aa6 |
|
17-Dec-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
udev link-config: add asserts to silence scan-build |
2fd069b18e525860514a70d3ea08410ca122d3e2 |
|
15-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Fix a few resource leaks in error paths
https://bugzilla.redhat.com/show_bug.cgi?id=1043304 |
f168c27313e4d7b0aabee037dc9c78a5799f0597 |
|
03-Dec-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
trivial coding style clean ups
- Add space between if/for and the opening parentheses
- Place the opening brace on same line as the function (not for udev)
From the CODING_STYLE
Try to use this:
void foo() {
}
instead of this:
void foo()
{
} |
ff83aac3647e21f31ac5e2b575ec1285dc585f6b |
|
28-Nov-2013 |
Tom Gundersen <teg@jklm.no> |
Revert "link-config: match length for kernel commandline option"
This reverts commit da66338e17f4df04d9d7cc22ec971b416d57761e.
It is superseeded by 70f75a523b16ad495a7791d595ee3eececf75953 |
d2df0d0ed3a88e491405b403e6022e6619750130 |
|
25-Nov-2013 |
Tom Gundersen <teg@jklm.no> |
udev: net_setup_link - don't use Description as Alias
Use Description only internally, and allow Alias to be set
as a separate option. For instance SNMP uses ifalias for
a specific purpose, so let's not write to it by default. |
489124365d1d391864898b9869dd668eea5b2e28 |
|
08-Nov-2013 |
Dave Reisner <dreisner@archlinux.org> |
link-config: Fix typo in log_warning |
da66338e17f4df04d9d7cc22ec971b416d57761e |
|
08-Nov-2013 |
Dave Reisner <dreisner@archlinux.org> |
link-config: match length for kernel commandline option
This prevents enable_name_policy() from invariably returning false when
it matches a zero length string at the end of /proc/cmdline. |
74df0fca09b3c31ed19e14ba80f996fdff772417 |
|
06-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
util: unify reading of /proc/cmdline
Instead of individually checking for containers in each user do this
once in a new call proc_cmdline() that read the file only if we are not
in a container. |
b3e013148603aa670bc2c060ac63d48e54d76fc2 |
|
05-Nov-2013 |
Tom Gundersen <teg@jklm.no> |
net-util: don't use libudev
Should fix linking with old toolchain. |
be32eb9b7fbcb22e4b648086d644135e38279633 |
|
04-Nov-2013 |
Tom Gundersen <teg@jklm.no> |
net-config: start split out matching and parsing logic
Move this to src/share/net-util.c, so it can be used elsewhere. |
c50e28a38ccbdd1e1d1f082dd67bb3e74be4d459 |
|
30-Oct-2013 |
Dave Reisner <dreisner@archlinux.org> |
link-config: support --enable-split-usr |
98a375f6d5cac24eb80d6d4e00699851324afdec |
|
30-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: config-link - one less log_info |
f61942250a43a123580d7bbe5d7873dc5118ed97 |
|
30-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - less verbose logging
Also reinstate print to kmsg when renaming netif. |
3e137a1b9a0eac2bf43d493d3302c3c959b6ccdb |
|
30-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - let udevd set the ifname |
3aeb37bc4f32b5edc334f2ac7c5d3c7b0a121328 |
|
29-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
rtnl: move set_link_properties to rtnl-utils |
977085794d2996320e345433403de75f662b0622 |
|
29-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - split connection to sockets from loading of configs
We want to load the config in _init, but not connect to the sockets before we are forked. |
98dd77e86e0cc339543cc8711ff908e6929f0636 |
|
29-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
rtnl: introduce default timeout
We set it to 10 secs (as we are only communicating with the kernel,
it seems we should be able to bail out sooner than sd-bus, which
uses 25).
When passing timout 0, the default is used, use this in link-config. |
f1ac700248f231b7bdac2aafe8c35650efddb89f |
|
29-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - use safe_atou instead of strtoul |
55428d84f31b52da1c50b7469f14e15740547f20 |
|
29-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - use proper return values
Not sure if -ENOENT is the correct return value for when no persistent network
name is set, but couldn't think of anything better. |
5b9d4dc05560ddda89e48b6b39365824b15e1300 |
|
29-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - use _cleanup_ macro locally |
97f2d76d4f4dfab8b0629c09926a05a1e5621125 |
|
29-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
path_check_timestamp: only keep the most recent timestamp
There is no point in keeping one timestamp for each directory, as we only
ever care about the most recent one. |
5fde13d748749f0e06e2e6cdd15f0980a79ea82c |
|
29-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - add proper parsing |
9dc670ea766c711741f462b29572f2e5f8f3f6bc |
|
29-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
network: move configuration to /etc/systemd/network
This is private configuraiton, so let's not pollute the namespace (and hence make Debian happy :) ). |
16b9b87aeee9353b5b8dae6089a69752422a5b09 |
|
28-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - add mac address policy
This introduces a new key MACAddressPolicy.
The possible policies are 'persistent' and 'random'.
'persistent' will do nothing if the current address is the hardware address,
but if the hardware does not have an address (or another address is set for
whatever reason), we will generate an address which will be random, but
persistent between boots (based on machineid and persistent netif name).
'random' will do nothing if the kernel already set a random address, otherwise
it will generate a random one and use that instead.
This patch sets MACAddressPolicy=persistent in the default .link file. |
daeb71a36a98834664e4d95773a3629b746f4db8 |
|
28-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - move naming policy from udev rules
This introduces a new key NamePolicy, which takes an ordered list of naming
policies. The first successful one is applide. If all fail the value of Name
(if any) is used.
The possible policies are 'onboard', 'slot', 'path' and 'mac'.
This patch introduces a default link file, which replaces the equivalent udev
rule. |
2a73e0d39a9bec82c3800071e375d27164727e71 |
|
27-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: link-config - sanity check the ifname and mac address |
43b3a5ef61859f06cdbaf26765cab8e1adac4296 |
|
27-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: link-config: add rtnl support
This adds support for setting the mac address, name and mtu.
Example:
[Link]
MTU=1450
MACAddress=98:76:54:32:10:ab
Name=wireless0 |
a501033335ed402c8f7e86fe41a15531ba69abd7 |
|
26-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: link-config: add ethtool support
This adds support for setting the link speed, duplex and WakeOnLan
settings.
Example:
[Link]
SpeedMBytes=100
Duplex=half
WakeOnLan=magic |
af6f0d422c521374ee6a2dd92df5935a5a476ae5 |
|
26-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
udev: add network link configuration tool
This tool applies hardware specific settings to network devices before they
are announced via libudev.
Settings that will probably eventually be supported are MTU, Speed,
DuplexMode, WakeOnLan, MACAddress, MACAddressPolicy (e.g., 'hardware',
'synthetic' or 'random'), Name and NamePolicy (replacing our current
interface naming logic). This patch only introduces support for
Description, as a proof of concept.
Some of these settings may later be overriden by a network management
daemon/script. However, these tools should always listen and wait on libudev
before touching a device (listening on netlink is not enough). This is no
different from how things used to be, as we always supported changing the
network interface name from udev rules, which does not work if someone
has already started using it.
The tool is configured by .link files in /etc/net/links/ (with the usual
overriding logic in /run and /lib). The first (in lexicographical order)
matching .link file is applied to a given device, and all others are ignored.
The .link files contain a [Match] section with (currently) the keys
MACAddress, Driver, Type (see DEVTYPE in udevadm info) and Path (this
matches on the stable device path as exposed as ID_PATH, and not the
unstable DEVPATH). A .link file matches a given device if all of the
specified keys do. Currently the keys are treated as plain strings,
but some limited globbing may later be added to the keys where it
makes sense.
Example:
/etc/net/links/50-wireless.link
[Match]
MACAddress=98:f2:e4:42:c6:92
Path=pci-0000:02:00.0-bcma-0
Type=wlan
[Link]
Description=The wireless link |