+/*
+ * netifd - network interface daemon
+ * Copyright (C) 2012 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation
+ *
+ * This program 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 General Public License for more details.
+ */
#include "netifd.h"
#include "device.h"
#include "config.h"
struct tunnel {
struct device dev;
device_state_cb set_state;
- struct blob_attr *config;
};
static int
int ret;
if (up) {
- ret = system_add_ip_tunnel(dev->ifname, tun->config);
+ ret = system_add_ip_tunnel(dev->ifname, dev->config);
if (ret != 0)
return ret;
}
tun = calloc(1, sizeof(*tun));
dev = &tun->dev;
- tun->config = config_memdup(attr);
device_init(dev, &tunnel_device_type, name);
tun->set_state = dev->set_state;
dev->set_state = tunnel_set_state;