X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=system-dummy.c;h=cae421d1c117fc0978e70604f4b0aadfc711bbd8;hp=f2e3aed94d9feacf13d8901581304b8dd953e0c2;hb=139b16ed4c7511f076ec4f5735c76954e4d3ea33;hpb=fcbec58e1494281dfeb2f19576c52667a512fad2 diff --git a/system-dummy.c b/system-dummy.c index f2e3aed..cae421d 100644 --- a/system-dummy.c +++ b/system-dummy.c @@ -1,3 +1,16 @@ +/* + * netifd - network interface daemon + * Copyright (C) 2012 Felix Fietkau + * + * 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 #include #include @@ -156,8 +169,10 @@ 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); D(SYSTEM, "route add %s%s%s\n", addr, gw, devstr); return 0; @@ -182,8 +197,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; @@ -203,3 +217,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; +}