networkd-ipv4ll.c revision cf0fbc49e67b55f8d346fc94de28c90113505297
/*-*- 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 "network-internal.h"
#include "networkd-link.h"
int r;
link->ipv4ll_route = false;
link->ipv4ll_address = false;
if (r < 0)
return 0;
r = address_new(&address);
if (r < 0) {
return r;
}
if (r < 0) {
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(&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 SD_IPV4LL_EVENT_STOP:
case SD_IPV4LL_EVENT_CONFLICT:
r = ipv4ll_address_lost(link);
if (r < 0) {
return;
}
break;
case SD_IPV4LL_EVENT_BIND:
if (r < 0) {
return;
}
break;
default:
break;
}
}
int r;
if (r < 0)
return r;
}
if (link->udev_device) {
if (r >= 0) {
assert_cc(sizeof(unsigned) <= 8);
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;
}