1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00
Commit Graph

14853 Commits

Author SHA1 Message Date
Kay Sievers
ca2bb1606a udev: do not export "static node" tags for non-existing devices 2014-04-02 15:47:09 +02:00
Tom Gundersen
bc29e507e2 sd-dhcp-client: use BPF on raw socket
Filter out everything except UDP packets destined for the DHCP client port,
this should avoid the vast majority of spurious wakeups.

Filter based on [0], with permission.

Possible improvemnts: also check for the DHCP magic cookie to drop invalid
packets. Check for our xid to filter out packets destined for other clients.

[0]: <https://github.com/ambrop72/badvpn/blob/master/dhcpclient/BDHCPClient.c#L57>
2014-04-02 14:49:51 +02:00
Kay Sievers
b6b20d1d36 build-sys: remove no longer needed user/org.freedesktop.DBus.busname 2014-04-02 11:34:59 +02:00
Thomas Hindoe Paaboel Andersen
5985ea4d17 build-sys: no use for compat libs in the static analysis 2014-04-01 22:32:44 +02:00
Tom Gundersen
bcf3ce7b39 sd-ipv4ll: speed up bind() in the same way as for dhcp 2014-04-01 21:29:56 +02:00
Daniel Buch
0ef298ab47 build-sys: workaround scan-build bug to fix ./autogen.sh s
It seems to be a clang-analyzer problem since it don't behave like
clang-compiler regarding -std={c99,gnu99}
2014-04-01 20:57:14 +02:00
Tom Gundersen
66a67effcc sd-dhcp-client: --omg-optimized
Passing the protocol to socket() is redundant as it will be specified again in
bind(). Dropping the redundancy reduces the cost of bind() from ~30ms to ~0ms.
For details see [0].

networkd in a container (i.e., with next to no network latency) can now
negotiate a DHCP lease in 0.7 - 5 ms.

Thanks to Kay for help with debugging and to Daniel Borkmann for the pointer
to fix the problem.

[0]: <https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=902fefb82ef72a50c78cb4a20cc954b037a98d1c>
2014-04-01 00:32:51 +02:00
Tom Gundersen
208612034e networkd: rewind rtnl message between passing it to functions
This makes updating link status on netdev links work again.
2014-03-31 17:17:56 +02:00
Tom Gundersen
689703f618 sd-rtnl: modernize a bit 2014-03-31 14:43:34 +02:00
Lukasz Skalski
5fa4ddb88c doc: fix items' names in PORTING-DBUS1 2014-03-31 14:23:49 +02:00
Tom Gundersen
c589a0e628 TODO 2014-03-31 11:30:59 +02:00
Tom Gundersen
fd88eb8ab0 networkd: link - fix memory leak 2014-03-31 10:04:32 +02:00
Tom Gundersen
2292547af9 networkd: fix use-after-free
Free networks before links (the reverse of creation order).
2014-03-31 10:01:59 +02:00
Steven Siloti
c8a7165f58 sd-rtnl: fix off-by-one
Also fix type parameter passed to new0
2014-03-31 09:54:37 +02:00
Kay Sievers
42742bf1ce timedated: adjust accuracy and slew values 2014-03-31 04:09:39 +02:00
Tom Gundersen
2ad7561f9f sd-dhcp: avoid checksum calculation if possible
When receiving lots of packets that are not meant for us, we waste a relatively large amount
of cpu time computing their checksums before discarding them. Move the checksum calculation last
so we never compute it for packets which would otherwise be discarded.
2014-03-30 20:46:40 +02:00
Tom Gundersen
6e34949d72 sd-dhcp: check for ipv4 packets 2014-03-30 20:46:40 +02:00
Umut Tezduyar Lindskog
d454a6748c sd-dhcp: check for udp packets
Do not try to parse ICMP packets

[tomegun: slightly tweaked debug message]
2014-03-30 20:46:20 +02:00
Tom Gundersen
3cbbb3e678 sd-rtnl: types - hook up bond types
Reported by Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
2014-03-29 23:53:03 +01:00
Tom Gundersen
0834ff93c3 sd-rtnl: message - fix clang compile warning 2014-03-29 23:52:03 +01:00
Tom Gundersen
aef0768e6c sd-rtnl: message - don't log about out-of-range attribute types
We will easily get these when running on newer kernels. However, we can safely ignore them as we
anyway don't know what to do with them.
2014-03-28 19:16:21 +01:00
Tom Gundersen
ba5596ec2e networkd: netdev - improve logging when setting ifindex 2014-03-28 19:16:21 +01:00
Tom Gundersen
d8e538ecd9 sd-rtnl: rework rtnl type system
Use a static table with all the typing information, rather than repeated
switch statements. This should make it a lot simpler to add new types.

We need to keep all the type info to be able to create containers
without exposing their implementation details to the users of the library.

As a freebee we verify the types of appended/read attributes.

The API is extended to nicely deal with unions of container types.
2014-03-28 19:11:59 +01:00
Tom Gundersen
9f5bbfe354 sd-rtnl: message - fix memory leak 2014-03-28 00:50:56 +01:00
Tom Gundersen
8c57830308 sd-rtnl: message - don't reference associated rtnl object
The object is not currently used, so just drop the refenence. If/when we end up
using the object in the future, we must make sure to deal with possible mutual
references between rtnl busses and their queued messages; as is done in sd-bus.
2014-03-28 00:50:50 +01:00
Tom Gundersen
bf81e792f3 udev: persistent naming - we cannot use virtio numbers as they are not stable
This reverts commit 8741f2defa: 'Add virtio-blk support to path_id' and
commit e3d563346c: 'udev: net_id - handle virtio buses'.

Distros may want to take note of this, as it changes behavior.
2014-03-27 21:47:14 +01:00
Thomas Hindoe Paaboel Andersen
9f2a50a300 silence warnings 2014-03-27 20:16:49 +01:00
Brandon Philips
93c941e3fb systemctl: fix spelling in comment 2014-03-27 11:56:33 -07:00
Kay Sievers
d4b687c96a udev: update net_id comments 2014-03-27 15:30:34 +01:00
Scott Thrasher
15f392394e Add hwdb entry for Samsung Series 7 Ultra 2014-03-26 23:15:12 -04:00
Kay Sievers
e57e4e2be3 build-sys: update "linkcheck"
<kay> ssuominen: and drop --no-as-needed from the linkcheck?
<kay> ssuominen: i expect it all triggers without the gc-sections thing alone
<ssuominen> if the intention is to make it strict as possible,
  to catch undefined references caused by missing -lfoo in linker line, then
  LDFLAGS="-Wl,-fuse-ld=gold -Wl,--as-needed -Wl,--no-gc-sections"
2014-03-26 19:22:17 +01:00
Kay Sievers
bc61d6ac01 build-sys: rename "check-broken" to "linkcheck" 2014-03-26 13:12:47 +01:00
Kay Sievers
381a662a90 build-sys: split "make upload" and "make tango" 2014-03-26 13:07:58 +01:00
Marcel Holtmann
f89b42ec0f hwdb: Update database of Bluetooth company identifiers 2014-03-25 20:21:23 -07:00
Kay Sievers
530a9662aa core: do not read system boot timestamps in systemd --user mode
Before:
  $ systemd-analyze --user
  Startup finished in 2.810s (firmware) + 48ms (loader) + 122ms (userspace) = 122ms

After:
  $ systemd-analyze --user
  Startup finished in 122ms (userspace) = 122ms
2014-03-26 03:47:03 +01:00
Kay Sievers
4851ac4526 bus: provide org.freedesktop.systemd1.busname for systemd --user 2014-03-26 03:38:48 +01:00
Kay Sievers
0afee06b26 build-sys: disable test-cgroup-mask, it mangles valid user data in /run/user/$UID/
$ ./test-cgroup-mask
  ...
  rmdir("/run/user/2702/systemd/generator") = 0
  open("/run/user/2702/systemd/generator.late", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_NOFOLLOW|O_NOATIME|O_CLOEXEC) = 5
  fstat(5, {st_mode=S_IFDIR|0755, st_size=3200, ...}) = 0
  fcntl(5, F_GETFL)                       = 0x78800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_NOFOLLOW|O_NOATIME)
  fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
  getdents(5, /* 160 entries */, 32768)   = 10072
  unlinkat(5, "org.gnome.Weather.Application.busname", 0) = 0
  unlinkat(5, "dbus-org.gnome.Weather.Application.service", 0) = 0
  ...
2014-03-26 02:54:34 +01:00
Kay Sievers
5870f79a0b build-sys: add "make check-broken" to find limited-toolchain link errors 2014-03-26 01:36:57 +01:00
Kay Sievers
2fa495c8a4 build-sys: fix library link order 2014-03-25 23:29:43 +01:00
Kay Sievers
78a337bd30 gitignore update 2014-03-25 23:29:43 +01:00
Kay Sievers
307e6d8304 build-sys: split-off internal libsystemd-resolve 2014-03-25 23:29:43 +01:00
Daniel Mack
4433c995c7 completions: fix/augment zsh completions for systemd-nspawn, busctl, loginctl, hostnamectl, localectl, machinectl 2014-03-25 23:05:03 +01:00
Jason St. John
10b17992ee src/systemd: fix grammar and spelling errors in comments 2014-03-25 20:23:33 +01:00
Lennart Poettering
3b5b000fbc build-sys: prepare 212 2014-03-25 20:22:41 +01:00
Lennart Poettering
51c61cda1a build-sys: prepare NEWS for 212 2014-03-25 15:19:57 +01:00
Susant Sahani
9a6704a81f sd-rtnl: add support for tunnel attributes
Added support for tunneling netlink attrributes (ipip, gre, sit).
These works with kernel module ipip, gre and sit . The test cases are
moved to a separate file and manual test as well because they require
respective kernel modules as well.
2014-03-25 14:44:33 +01:00
Tom Gundersen
41ca2c206b sd-rtnl: message - don't try to enter unsupported containers
Currently we only support containers in RTM_*LINK messages.

Reported-by: "Thomas H.P. Andersen <phomes@gmail.com>"
2014-03-25 12:05:59 +01:00
Lennart Poettering
5ba6e0949c time: support @ syntax for denoting times since the UNIX epoch 1970-1-1 2014-03-25 04:08:16 +01:00
Lennart Poettering
a2b135e3d8 update TODO 2014-03-25 02:11:52 +01:00
Lennart Poettering
67608cad23 util: consider both fuse.glusterfs and glusterfs network file systems
Based on a similar patch by Lukáš Nykrýn.
2014-03-25 01:46:24 +01:00