networkd-dhcp6.c revision 6d8f6b0b2ae14aee0b02c7e3d1edaeaa2c118056
/*-*- 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 "networkd-link.h"
#include "network-internal.h"
#include "sd-ndisc.h"
#include "sd-dhcp6-client.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;
bool 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;
}
int r;
if (r < 0)
return r;
if (r < 0)
return r;
&lifetime_valid) >= 0) {
&ip6_addr);
if (r < 0)
continue;
log_link_info(link, "IPv6 prefix length updated "SD_NDISC_ADDRESS_FORMAT_STR"/%d", SD_NDISC_ADDRESS_FORMAT_VAL(ip6_addr), 128);
}
return 0;
}