File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 3535#include <fluent-bit/flb_metrics.h>
3636#include <fluent-bit/flb_storage.h>
3737#include <fluent-bit/flb_downstream.h>
38+ #include <fluent-bit/flb_upstream.h>
3839#include <fluent-bit/flb_plugin.h>
3940#include <fluent-bit/flb_kv.h>
4041#include <fluent-bit/flb_hash_table.h>
@@ -888,11 +889,20 @@ int flb_input_net_property_check(struct flb_input_instance *ins,
888889{
889890 int ret = 0 ;
890891
891- /* Get Downstream net_setup configmap */
892- ins -> net_config_map = flb_downstream_get_config_map (config );
893- if (!ins -> net_config_map ) {
894- flb_input_instance_destroy (ins );
895- return -1 ;
892+ /* Get Downstream or Upstream net_setup configmap */
893+ if (ins -> p -> flags & FLB_INPUT_NET_SERVER ) {
894+ ins -> net_config_map = flb_downstream_get_config_map (config );
895+ if (!ins -> net_config_map ) {
896+ flb_input_instance_destroy (ins );
897+ return -1 ;
898+ }
899+ }
900+ else if (ins -> p -> flags & FLB_INPUT_NET ) {
901+ ins -> net_config_map = flb_upstream_get_config_map (config );
902+ if (!ins -> net_config_map ) {
903+ flb_input_instance_destroy (ins );
904+ return -1 ;
905+ }
896906 }
897907
898908 /*
You can’t perform that action at this time.
0 commit comments