networkd-dhcp6.c revision 04c0136989b7eb896bfb0fb176e11233d69e1453
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright (C) 2014 Intel Corporation. All rights reserved.
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 "sd-dhcp6-client.h"
#include "network-internal.h"
#include "networkd-link.h"
return 0;
}
void *userdata) {
int r;
r = sd_netlink_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
if (link->rtnl_extended_attrs) {
log_link_warning(link, "Could not set extended netlink attributes, reverting to fallback mechanism");
link->rtnl_extended_attrs = false;
return 1;
}
} else if (r >= 0)
return 1;
}
int r;
r = address_new(&addr);
if (r < 0)
return r;
if (r < 0)
return r;
}
int r;
if (r < 0)
return r;
&lifetime_valid) >= 0) {
if (r < 0)
return r;
}
return 0;
}
int r;
return;
switch(event) {
link->dhcp6_configured = false;
break;
if (r < 0) {
return;
}
/* fall through */
if (r < 0) {
return;
}
link->dhcp6_configured = true;
break;
default:
if (event < 0)
else
return;
}
}
int r, information_request;
link->dhcp6_configured = false;
if (link->dhcp6_client) {
if (r < 0) {
goto error;
}
if (information_request && !inf_req) {
if (r < 0) {
goto error;
}
if (r < 0) {
goto error;
}
}
if (r < 0 && r != -EALREADY) {
goto error;
}
if (r == -EALREADY)
link->dhcp6_configured = true;
return r;
}
if (r < 0)
goto error;
if (r < 0)
goto error;
if (r < 0)
goto error;
if (r < 0)
goto error;
link);
if (r < 0)
goto error;
if (inf_req) {
if (r < 0)
goto error;
}
if (r < 0)
goto error;
return r;
return r;
}