fix ifname for alias+vlan chains
[project/netifd.git] / system-dummy.c
index 71dad0e..a2411f3 100644 (file)
@@ -1,3 +1,16 @@
+/*
+ * 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 <sys/time.h>
 #include <stdio.h>
 #include <string.h>
@@ -53,6 +66,11 @@ int system_vlan_del(struct device *dev)
        return 0;
 }
 
+bool system_if_force_external(const char *ifname)
+{
+       return false;
+}
+
 int system_if_up(struct device *dev)
 {
        D(SYSTEM, "ifconfig %s up\n", dev->ifname);
@@ -156,8 +174,7 @@ int system_add_route(struct device *dev, struct device_route *route)
                sprintf(gw, " gw %d.%d.%d.%d",
                        a2[0], a2[1], a2[2], a2[3]);
 
-       if (route->flags & DEVADDR_DEVICE)
-               sprintf(devstr, " dev %s", dev->ifname);
+       sprintf(devstr, " dev %s", dev->ifname);
 
        if (route->metric > 0)
                sprintf(devstr, " metric %d", route->metric);
@@ -185,8 +202,7 @@ int system_del_route(struct device *dev, struct device_route *route)
                sprintf(gw, " gw %d.%d.%d.%d",
                        a2[0], a2[1], a2[2], a2[3]);
 
-       if (route->flags & DEVADDR_DEVICE)
-               sprintf(devstr, " dev %s", dev->ifname);
+       sprintf(devstr, " dev %s", dev->ifname);
 
        D(SYSTEM, "route del %s%s%s\n", addr, gw, devstr);
        return 0;
@@ -206,3 +222,13 @@ time_t system_get_rtime(void)
 
        return 0;
 }
+
+int system_del_ip_tunnel(const char *name)
+{
+       return 0;
+}
+
+int system_add_ip_tunnel(const char *name, struct blob_attr *attr)
+{
+       return 0;
+}