networkd-ipv4ll.c revision b45e4eb679ad0c9a77c4fe6e404c8842d4097fdb
/*-*- 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_netlink_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
}
link->ipv4ll_route = true;
if (link->ipv4ll_address == true)
return 1;
}
int r;
r = sd_netlink_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:
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;
}