networkd-ipv4ll.c revision 45af44d47da6933b260c734ad9ff721f63f80a4d
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2013-2014 Tom Gundersen <teg@jklm.no>
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "networkd-link.h"
#include "network-internal.h"
int r;
link->ipv4ll_route = false;
link->ipv4ll_address = false;
if (r < 0)
return 0;
r = address_new_dynamic(&address);
if (r < 0) {
return r;
}
if (r < 0) {
strerror(-r));
return r;
}
return 0;
}
int r;
r = sd_rtnl_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
}
link->ipv4ll_route = true;
if (link->ipv4ll_address == true)
return 1;
}
int r;
r = sd_rtnl_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
} else if (r >= 0)
link->ipv4ll_address = true;
if (link->ipv4ll_route == true)
return 1;
}
int r;
if (r == -ENOENT)
return 0;
else if (r < 0)
return r;
r = address_new_dynamic(&ll_addr);
if (r < 0)
return r;
if (r < 0)
return r;
link->ipv4ll_address = false;
if (r < 0)
return r;
if (r < 0)
return r;
link->ipv4ll_route = false;
return 0;
}
int r;
return;
switch(event) {
case IPV4LL_EVENT_STOP:
case IPV4LL_EVENT_CONFLICT:
r = ipv4ll_address_lost(link);
if (r < 0) {
return;
}
break;
case IPV4LL_EVENT_BIND:
if (r < 0) {
return;
}
break;
default:
if (event < 0)
else
break;
}
}
int r;
if (r < 0)
return r;
if (link->udev_device) {
if (r >= 0) {
if (r < 0)
return r;
}
}
if (r < 0)
return r;
if (r < 0)
return r;
if (r < 0)
return r;
if (r < 0)
return r;
return 0;
}