along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <net/if.h>
+
#include "networkd.h"
#include "network-internal.h"
#include "path-util.h"
[NETDEV_KIND_IPIP] = "ipip",
[NETDEV_KIND_GRE] = "gre",
[NETDEV_KIND_SIT] = "sit",
+ [NETDEV_KIND_VETH] = "veth",
};
DEFINE_STRING_TABLE_LOOKUP(netdev_kind, NetDevKind);
if (r == -EEXIST)
log_debug_netdev(netdev, "netdev exists, using existing");
else if (r < 0) {
- log_warning_netdev(netdev, "netdev could not be greated: %s", strerror(-r));
+ log_warning_netdev(netdev, "netdev could not be created: %s", strerror(-r));
netdev_drop(netdev);
return 1;
return r;
}
-
if (netdev->ifindex > 0) {
if (netdev->ifindex != ifindex) {
log_error_netdev(netdev, "Could not set ifindex to %d, already set to %d",
netdev->kind = _NETDEV_KIND_INVALID;
netdev->macvlan_mode = _NETDEV_MACVLAN_MODE_INVALID;
netdev->vlanid = VLANID_MAX + 1;
+ netdev->tunnel_pmtudisc = true;
- r = config_parse(NULL, filename, file, "Match\0NetDev\0VLAN\0MACVLAN\0Tunnel\0",
+ r = config_parse(NULL, filename, file, "Match\0NetDev\0VLAN\0MACVLAN\0Tunnel\0Peer\0",
config_item_perf_lookup, (void*) network_netdev_gperf_lookup,
false, false, netdev);
if (r < 0) {
LIST_HEAD_INIT(netdev->callbacks);
+ if(netdev->kind == NETDEV_KIND_VETH)
+ return netdev_create_veth(netdev, netdev_create_handler);
+
if (netdev->kind != NETDEV_KIND_VLAN &&
netdev->kind != NETDEV_KIND_MACVLAN &&
netdev->kind != NETDEV_KIND_IPIP &&