networkd-netdev-vxlan.c revision 0b1831c20c4d30077b6560b2b7d88bdb220d5cef
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2014 Susant Sahani <susant@redhat.com>
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-rtnl.h"
#include "networkd-netdev-vxlan.h"
#include "networkd-link.h"
#include "missing.h"
int r;
assert(v);
assert(m);
if (v->id <= VXLAN_VID_MAX) {
if (r < 0) {
"Could not append IFLA_VXLAN_ID attribute: %s",
strerror(-r));
return r;
}
}
if (r < 0) {
"Could not append IFLA_VXLAN_GROUP attribute: %s",
strerror(-r));
return r;
}
if (r < 0) {
"Could not append IFLA_VXLAN_LINK attribute: %s",
strerror(-r));
return r;
}
if(v->ttl) {
if (r < 0) {
"Could not append IFLA_VXLAN_TTL attribute: %s",
strerror(-r));
return r;
}
}
if(v->tos) {
if (r < 0) {
"Could not append IFLA_VXLAN_TOS attribute: %s",
strerror(-r));
return r;
}
}
if (r < 0) {
"Could not append IFLA_VXLAN_LEARNING attribute: %s",
strerror(-r));
return r;
}
return r;
}
assert(v);
if (v->id > VXLAN_VID_MAX) {
return -EINVAL;
}
return 0;
}
assert(v);
v->learning = true;
}
const NetDevVTable vxlan_vtable = {
.object_size = sizeof(VxLan),
.init = vxlan_init,
.sections = "Match\0NetDev\0VXLAN\0",
};