[systemd-devel] dbus-daemon and kdbus running together

2013-11-24 Thread Umut Tezduyar Lindskog
Hi, If we needed to keep dbus-daemon but take advantages of kdbus, will we be able to run them together? To be able to fully compatible with kdbus and be ready to switch when time comes, what needs to be done? - Have kdbus support for glib applications (work is ongoing with the patch from

[systemd-devel] Thread level resource management

2013-11-24 Thread Umut Tezduyar Lindskog
Hi, How do we support thread level resource management with the new cgroup abstraction? Can we use scopes with task ids of threads? If so, what is the API to put the task id into its own scope unit? Thanks. ___ systemd-devel mailing list

[systemd-devel] Improving the results shown with systemd-analyze blame

2013-11-24 Thread Umut Tezduyar Lindskog
Hi, I think we can make the output of systemd-analyze blame more useful with cpu accounting information. The output of systemd-analyze blame is not making so much sense when lots of programs are tried to be started at the same time since it is not known which program actually uses the cpu at

[systemd-devel] systemd-networkd with 802.1x

2013-11-24 Thread Umut Tezduyar Lindskog
Hi, Are there any plans to support 802.1x by systemd-networkd? Thanks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] dbus-daemon and kdbus running together

2013-11-24 Thread Daniel Mack
On Sun, Nov 24, 2013 at 12:31:17PM +0100, Umut Tezduyar Lindskog wrote: If we needed to keep dbus-daemon but take advantages of kdbus, will we be able to run them together? In theory yes, but it wouldn't make any sense, as dbus-daemon connected clients wouldn't be able to see kdbus clients,

Re: [systemd-devel] systemd-networkd with 802.1x

2013-11-24 Thread Tom Gundersen
On Sun, Nov 24, 2013 at 2:27 PM, Umut Tezduyar Lindskog umut.tezdu...@axis.com wrote: Are there any plans to support 802.1x by systemd-networkd? To the best of my knowledge no one is working on it now, nor planning on working on it any time soon. However, it would be within the scope of

Re: [systemd-devel] Thread level resource management

2013-11-24 Thread Kay Sievers
On Sun, Nov 24, 2013 at 12:33 PM, Umut Tezduyar Lindskog umut.tezdu...@axis.com wrote: How do we support thread level resource management with the new cgroup abstraction? Can we use scopes with task ids of threads? If so, what is the API to put the task id into its own scope unit? There is

[systemd-devel] syslog makes impossible to enter emergency mode

2013-11-24 Thread Andrey Borzenkov
Interesting case (https://bugzilla.novell.com/show_bug.cgi?id=852021). Systemd enters emergency due to failed mount. At the same time syslog socket triggers syslog.service. Due to implicit Requires on basic.target which Requires sysinit.target which conflicts with emergency.{service,target}

Re: [systemd-devel] syslog makes impossible to enter emergency mode

2013-11-24 Thread David Timothy Strauss
On Nov 25, 2013 4:36 AM, Andrey Borzenkov arvidj...@gmail.com wrote: Interesting case (https://bugzilla.novell.com/show_bug.cgi?id=852021). Systemd enters emergency due to failed mount. At the same time syslog socket triggers syslog.service. Due to implicit Requires on basic.target which

Re: [systemd-devel] send -isolateDevice and -config option to Xserver

2013-11-24 Thread Floris
Op Sat, 23 Nov 2013 01:39:33 +0100 schreef Laércio de Sousa lbsous...@gmail.com:Hi Floris! The best option for you is to use Nouveau open-source drivers with your NVIDIA card, because they are more systemd-friendly. If you really need the proprietary NVIDIA drivers, you'll need to recompile

Re: [systemd-devel] send -isolateDevice and -config option to Xserver

2013-11-24 Thread Tom Gundersen
On Sun, Nov 24, 2013 at 11:05 PM, Floris jkflo...@dds.nl wrote: Op Sat, 23 Nov 2013 01:39:33 +0100 schreef Laércio de Sousa lbsous...@gmail.com: Hi Floris! The best option for you is to use Nouveau open-source drivers with your NVIDIA card, because they are more systemd-friendly. If you

[systemd-devel] [PATCH v2 23/26] dhcp: Process DHCP Ack/Nak message

2013-11-24 Thread Patrik Flykt
Process a DHCP Ack/Nak in much the same way as an DHCP Offer. Factor out header verification and process options sent. Add notification functionality with discrete values for the outcome of the DHCP Ack/ Nak processing. --- v2: - previous 24/28 - replace 'err' with 'r' and fix fd as suggested

[systemd-devel] [PATCH v2 20/26] dhcp: Handle received DHCP Offer message

2013-11-24 Thread Patrik Flykt
Create a function for handling the full IP, UDP and DHCP packet and tie it to the main loop. Verify IP and UDP headers and checksum. Creat a new lease structure with using the values supplied in the DHCP message. Free the lease structure when client is stopped. Split out socket handling into a

[systemd-devel] [PATCH v2 08/26] dhcp: Add tests for DHCP options, file and sname fields

2013-11-24 Thread Patrik Flykt
Add a structure describing the DHCP file, sname and trailing options fields. Create a messge holding these fields and call the internal option parsing function. In the test callback function verify that only regular options are passed and figure out which part of the DHCP message is the one that

[systemd-devel] [PATCH v2 06/26] dhcp: Add buffer length and invalid cookie tests for DHCP options

2013-11-24 Thread Patrik Flykt
Create an initial simple test program for these two cases. --- src/dhcp/test-dhcp-option.c | 51 +++ 1 file changed, 51 insertions(+) create mode 100644 src/dhcp/test-dhcp-option.c diff --git a/src/dhcp/test-dhcp-option.c b/src/dhcp/test-dhcp-option.c

[systemd-devel] [PATCH v2 01/26] dhcp: Add DHCP protocol structures and initial defines

2013-11-24 Thread Patrik Flykt
Create a new directory to host DHCP components. --- v2: use _packed_, be*_t where appropriate and anonymous enums src/dhcp/protocol.h | 104 +++ 1 file changed, 104 insertions(+) create mode 100644 src/dhcp/protocol.h diff --git

[systemd-devel] [PATCH v2 09/26] dhcp: Add option append tests

2013-11-24 Thread Patrik Flykt
Add checks for invalid lengths and parameters when using the option appending function. Add also checks for adding options, see to it that the resulting array is identical to the array of options added. --- src/dhcp/test-dhcp-option.c | 71 +++ 1 file

[systemd-devel] [PATCH v2 13/26] dhcp: Add DHCP discover sending

2013-11-24 Thread Patrik Flykt
On starting the client, use the supplied interface mac address and create a transaction id. Puzzle together an IP/UDP/DHCP Discover message, compute checksums and send it out as a raw packet. Create an additional function that constructs default options common to all DHCP messages. Set the DHCP

[systemd-devel] [PATCH v2 04/26] build: Add initial build support

2013-11-24 Thread Patrik Flykt
The client test program is the only one to be built so far. --- Makefile.am | 15 +++ configure.ac |9 + src/dhcp/Makefile |1 + 3 files changed, 25 insertions(+) create mode 12 src/dhcp/Makefile diff --git a/Makefile.am b/Makefile.am index

[systemd-devel] [PATCH v2 16/26] dhcp: Support seconds elapsed since start of DHCP negotiation

2013-11-24 Thread Patrik Flykt
It was noticed by Grant Erickson in ConnMan commit 95e15c09350acf58d4707056ae2614570883ef66 that: Certain DHCP servers, such as that implemented in Mac OS X ( 10.7) for its Internet Sharing feature, refuse to issue a DHCP lease to clients that have not set a non-zero value in their

[systemd-devel] [PATCH v2 02/26] dhcp: Add DHCP client initialization

2013-11-24 Thread Patrik Flykt
Provide functionality for initializing a DHCP client struct, setting interface index, last used address and additional options to request. On initialization the most useful options are added by default. --- v2: - public api with sd_ prefix into src/systemd/sd-dhcp-client.h - use assert_return

[systemd-devel] [PATCH v2 18/26] build: Add dependency on libsystemd-bus needed for main loop

2013-11-24 Thread Patrik Flykt
--- Makefile.am |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3f698b5..c4394c2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3767,7 +3767,8 @@ libsystemd_dhcp_la_LDFLAGS = \ $(AM_LDFLAGS) libsystemd_dhcp_la_LIBADD = \ -

[systemd-devel] [PATCH v2 22/26] dhcp: Add maximum message size option

2013-11-24 Thread Patrik Flykt
Add maximum message size option to keep some DHCP server implementations from sending too big messages. See ConnMan commit 0c5c862749c05193cf4c513628328c6db02b5222. --- src/dhcp/client.c | 12 src/dhcp/protocol.h |1 + 2 files changed, 13 insertions(+) diff --git

[systemd-devel] [PATCH v2 12/26] dhcp: Add function for sending a raw packet

2013-11-24 Thread Patrik Flykt
Open a packet socket, create a link level header, send packet and close socket. Adding it to a separate file makes testing of the DHCP sending much easier, as the test program can supply any socket to the DHCP client code. --- v2: - previous 11/28 - use sockaddr_union, initialize with {},

[systemd-devel] [PATCH v2 15/26] dhcp: Add test for discover DHCP packet creation

2013-11-24 Thread Patrik Flykt
Set a fake MAC address and emulate raw packet sending. When the buffer containing the Discover message is received, check selected IP and UDP headers and compute IP header and UDP message checksums. Also send the DHCP message for option parsing and expect a successful outcome. --- Makefile.am

[systemd-devel] [PATCH v2 00/26] Initial DHCP v4 library implementation

2013-11-24 Thread Patrik Flykt
Hi, Here is version 2 of the libsystemd-dhcp patch set fixed according to comments. Functionality is the same as in the earlier version. I'm still usin src/dhcp as the location for this code, but what might be the proper directory for the code eventually? I also left it conditionally

[systemd-devel] [PATCH v2 07/26] build: Add DHCP option test

2013-11-24 Thread Patrik Flykt
--- Makefile.am | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Makefile.am b/Makefile.am index 64d4b34..cd540ab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3749,6 +3749,15 @@ endif # -- if

[systemd-devel] [PATCH v2 19/26] dhcp: Add timeout and main loop support

2013-11-24 Thread Patrik Flykt
Require a main loop to be set when creating a DHCP client. Set up a timer to resend DHCP Discover messages and add a 0-2 second delay to the timeout value. Move to state Selecting after successful sending of a Discover message. --- v2: - previous 20/28 - use usec_t - adding monotonic event

[systemd-devel] [PATCH v2 17/26] dhcp: Add function to stop the DHCP client

2013-11-24 Thread Patrik Flykt
The client is stopped and brought back to its initial state. --- src/dhcp/client.c| 32 src/systemd/sd-dhcp-client.h |1 + 2 files changed, 33 insertions(+) diff --git a/src/dhcp/client.c b/src/dhcp/client.c index 6a0704e..8735efe 100644 ---

[systemd-devel] [PATCH v2 25/26] dhcp: Add notification callback

2013-11-24 Thread Patrik Flykt
Define a notification callback and events for stopping and client lease expiry. Add functions to fetch IP parameters from a lease. --- v2: - previous 26/28 - prefix length is more useful, implement a function for it instead of netmask src/dhcp/client.c| 101

[systemd-devel] [PATCH v2 03/26] dhcp: Add test for DHCP client initialization and parameter setting

2013-11-24 Thread Patrik Flykt
--- src/dhcp/test-dhcp-client.c | 81 +++ 1 file changed, 81 insertions(+) create mode 100644 src/dhcp/test-dhcp-client.c diff --git a/src/dhcp/test-dhcp-client.c b/src/dhcp/test-dhcp-client.c new file mode 100644 index 000..34a3ffa --- /dev/null

[systemd-devel] [PATCH v2 11/26] shared: Add struct sockaddr_ll to sockaddr_union

2013-11-24 Thread Patrik Flykt
--- v2: new patch, add sockaddr_ll to sockaddr_union src/shared/socket-util.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/socket-util.h b/src/shared/socket-util.h index d42a2fe..84ebc30 100644 --- a/src/shared/socket-util.h +++ b/src/shared/socket-util.h @@ -27,6 +27,7 @@

[systemd-devel] [PATCH v2 21/26] dhcp: Send DHCP Request to acquire an IP address

2013-11-24 Thread Patrik Flykt
Create and send a DHCP Request message reusing already existing parts of the code. This causes factoring out IP and UDP header creation and moving next timeout calculation to be done every time in the timer callback function independent of DHCP state. Also add an exponential part to the timer

[systemd-devel] [PATCH v2 05/26] dhcp: Add option appending and parsing

2013-11-24 Thread Patrik Flykt
Add functions to append and parse DHCP options. Not all options are passed to the callback function, the ones not exposed are pad, end, message type and overload. If indicated by the overload option, file and sname fields will be examined for more options. The option functions are internal to

[systemd-devel] [PATCH v2 26/26] dhcp: Add function to free DHCP client data

2013-11-24 Thread Patrik Flykt
--- src/dhcp/client.c| 12 src/systemd/sd-dhcp-client.h |1 + 2 files changed, 13 insertions(+) diff --git a/src/dhcp/client.c b/src/dhcp/client.c index fb28b7b..fc4c791 100644 --- a/src/dhcp/client.c +++ b/src/dhcp/client.c @@ -945,6 +945,18 @@ int

[systemd-devel] [PATCH v2 14/26] build: Add libsystemd-dhcp

2013-11-24 Thread Patrik Flykt
--- v2: - previous 13/28 - public api in src/systemd/sd-dhcp-client.h Makefile.am | 20 1 file changed, 20 insertions(+) diff --git a/Makefile.am b/Makefile.am index cd540ab..b038e07 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3749,6 +3749,26 @@ endif #

[systemd-devel] [PATCH v2 10/26] dhcp: Add test function for computing checksum

2013-11-24 Thread Patrik Flykt
--- v2: kept the cast, compiler didn't like it's removal src/dhcp/test-dhcp-client.c | 40 1 file changed, 40 insertions(+) diff --git a/src/dhcp/test-dhcp-client.c b/src/dhcp/test-dhcp-client.c index 34a3ffa..c6a9eb1 100644 ---

[systemd-devel] [PATCH v2 24/26] dhcp: Compute expire, T1 and T2 timers

2013-11-24 Thread Patrik Flykt
Compute the default T1 and T2 timer values if they were not set by the DHCP server. Verify that the values are reasonable. --- v2: - previous 25/28 - fix ordering of t1, t1 and expiry as suggested - unref accepts NULL, simplify code src/dhcp/client.c | 117

Re: [systemd-devel] systemd-networkd with 802.1x

2013-11-24 Thread Umut Tezduyar Lindskog
Hi Tom, Thanks for your answer. It seems like bunch of other protocol supports are being asked too. Maybe we could have a page on what protocols are supported, will be supported and in which priority they will be implemented. I would think port access protocols would be needed for servers even