X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=proto-static.c;h=51e20836e55db23083cc847122ad1fbda6c1e5f4;hp=4ee479320f664a0e865b1479c602ff9d93b5a6b4;hb=5dc8988377cccbdd9a520f21000d2cea1fc76f7f;hpb=285039a8783654439d9c0e29aac16e3893e2444b diff --git a/proto-static.c b/proto-static.c index 4ee4793..51e2083 100644 --- a/proto-static.c +++ b/proto-static.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 @@ -20,7 +33,11 @@ struct static_proto_state { static bool static_proto_setup(struct static_proto_state *state) { - return proto_apply_ip_settings(state->proto.iface, state->config) == 0; + struct interface *iface = state->proto.iface; + struct device *dev = iface->main_dev.dev; + + interface_set_l3_dev(iface, dev); + return proto_apply_static_ip_settings(state->proto.iface, state->config) == 0; } static int @@ -39,8 +56,10 @@ static_handler(struct interface_proto_state *proto, break; case PROTO_CMD_TEARDOWN: + case PROTO_CMD_RENEW: break; } + return ret; }