-int interface_proto_event(struct interface_proto_state *proto,
- enum interface_proto_cmd cmd, bool force)
+ if (!proto_name) {
+ interface_add_error(iface, "proto", "NO_PROTO", NULL, 0);
+ return;
+ }
+
+ proto = get_proto_handler(proto_name);
+ if (!proto)
+ interface_add_error(iface, "proto", "INVALID_PROTO", NULL, 0);
+
+ iface->proto_handler = proto;
+}
+
+int
+interface_proto_event(struct interface_proto_state *proto,
+ enum interface_proto_cmd cmd, bool force)