networkd-netdev-vxlan.c revision 1c4baffc1895809bae9ac36b670af90a4cb9cd7d
/*-*- 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-netlink.h"
#include "networkd-netdev-vxlan.h"
#include "networkd-link.h"
#include "conf-parser.h"
#include "missing.h"
int r;
assert(v);
assert(m);
if (v->id <= VXLAN_VID_MAX) {
if (r < 0)
}
if (r < 0)
if (r < 0)
if(v->ttl) {
if (r < 0)
}
if(v->tos) {
if (r < 0)
}
if (r < 0)
if (r < 0)
if (r < 0)
if (r < 0)
if (r < 0)
if(v->fdb_ageing) {
if (r < 0)
}
if (r < 0)
if (r < 0)
return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_UDP_ZERO_CSUM6_TX attribute: %m");
if (r < 0)
return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_UDP_ZERO_CSUM6_RX attribute: %m");
return r;
}
int config_parse_vxlan_group_address(const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
int r, f;
if (r < 0) {
"vxlan multicast group address is invalid, ignoring assignment: %s", rvalue);
return 0;
}
"vxlan multicast group incompatible, ignoring assignment: %s", rvalue);
return 0;
}
v->family = f;
return 0;
}
assert(v);
if (v->id > VXLAN_VID_MAX) {
return -EINVAL;
}
return 0;
}
assert(v);
v->learning = true;
v->udpcsum = false;
v->udp6zerocsumtx = false;
v->udp6zerocsumrx = false;
}
const NetDevVTable vxlan_vtable = {
.object_size = sizeof(VxLan),
.init = vxlan_init,
.sections = "Match\0NetDev\0VXLAN\0",
};