networkd-dhcp6.c revision 851c9f82736c89d423b244a292e153ec7124d309
/*-*- 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-icmp6-nd.h"
#include "sd-dhcp6-client.h"
return 0;
}
void *userdata) {
int r;
r = sd_rtnl_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
strerror(-r));
} else if (r >= 0)
return 1;
}
int r;
r = address_new_dynamic(&addr);
if (r < 0)
return r;
log_link_struct(link, LOG_INFO, "MESSAGE=%-*s: DHCPv6 address "SD_ICMP6_ADDRESS_FORMAT_STR"/%d timeout preferred %d valid %d",
NULL);
if (r < 0)
strerror(-r));
return r;
}
int r;
if (r < 0)
return r;
if (r < 0)
return r;
&lifetime_valid) >= 0) {
&ip6_addr);
if (r >= 0) {
return r;
}
}
return 0;
}
int r;
if (r < 0)
return r;
&lifetime_valid) >= 0) {
if (r < 0 && r != -EADDRNOTAVAIL) {
strerror(-r));
return r;
}
if (r == -EADDRNOTAVAIL)
prefixlen = 128;
if (r < 0)
return r;
}
return 0;
}
int r;
return;
switch(event) {
case DHCP6_EVENT_STOP:
case DHCP6_EVENT_RETRANS_MAX:
break;
case DHCP6_EVENT_IP_ACQUIRE:
if (r < 0) {
return;
}
/* fall through */
if (r < 0) {
return;
}
break;
default:
if (event < 0)
else
event);
return;
}
}
int r;
bool information_request;
if (link->dhcp6_client) {
return 0;
if (r < 0) {
strerror(-r));
link->dhcp6_client =
return r;
}
if (!information_request)
return r;
false);
if (r < 0) {
strerror(-r));
link->dhcp6_client =
return r;
}
if (r < 0) {
strerror(-r));
link->dhcp6_client =
return r;
}
return r;
}
if (r < 0)
return r;
if (r < 0) {
return r;
}
if (r < 0) {
return r;
}
if (r < 0) {
return r;
}
link);
if (r < 0) {
return r;
}
if (event == ICMP6_EVENT_ROUTER_ADVERTISMENT_OTHER) {
true);
if (r < 0) {
link->dhcp6_client =
return r;
}
}
if (r < 0)
return r;
}
return;
switch(event) {
return;
break;
break;
default:
if (event < 0)
else
event);
break;
}
}
int r;
if (r < 0)
return r;
if (r < 0)
return r;
if (r < 0)
return r;
if (r < 0)
return r;
return r;
}