[systemd-commits] src/network

Tom Gundersen tomegun at kemper.freedesktop.org
Sat Jun 14 06:07:07 PDT 2014


 src/network/networkd-link.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit d9876a527f62e85c3c972bc5f45ad872cb4958c1
Author: Tom Gundersen <teg at jklm.no>
Date:   Sat Jun 14 15:03:56 2014 +0200

    networkd: add assert
    
    It should not be possible to have a DHCP lease on a link without also having
    an associated network. Add assert() to avoid compiler warnings.
    
    Reported by Thomas H. P. Andersen

diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index baa0756..452fcd4 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -2152,6 +2152,8 @@ int link_save(Link *link) {
         }
 
         if (link->dhcp_lease) {
+                assert(link->network);
+
                 r = dhcp_lease_save(link->dhcp_lease, link->lease_file);
                 if (r < 0)
                         goto finish;



More information about the systemd-commits mailing list