From aa25738c8e923a2ff54aaccb44bf8126435789f0 Mon Sep 17 00:00:00 2001 From: sandeep sharma Date: Thu, 17 Feb 2022 14:28:45 +0000 Subject: [PATCH] bbf: Default values in X_IOPSYS_IGMP/MLD shown correctly --- dmtree/vendor/iopsys/tr181/x_iopsys_eu_igmp.c | 21 ++++++++----------- dmtree/vendor/iopsys/tr181/x_iopsys_eu_mld.c | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/dmtree/vendor/iopsys/tr181/x_iopsys_eu_igmp.c b/dmtree/vendor/iopsys/tr181/x_iopsys_eu_igmp.c index bf958eb8..0c425c1c 100644 --- a/dmtree/vendor/iopsys/tr181/x_iopsys_eu_igmp.c +++ b/dmtree/vendor/iopsys/tr181/x_iopsys_eu_igmp.c @@ -774,7 +774,7 @@ int set_mcasts_filter_address(char *refparam, struct dmctx *ctx, void *data, cha int get_mcast_snooping_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) { - *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "enable", "1"); + *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "enable", "0"); return 0; } @@ -800,7 +800,7 @@ static int get_igmp_version(char *refparam, struct dmctx *ctx, void *data, char { char *val; dmuci_get_value_by_section_string((struct uci_section *)data, "version", &val); - *value = (DM_STRCMP(val, "2") == 0) ? "V2" : "V3"; + *value = (DM_STRCMP(val, "3") == 0) ? "V3" : "V2"; return 0; } @@ -883,10 +883,7 @@ int set_mcasts_last_mq_interval(char *refparam, struct dmctx *ctx, void *data, c int get_mcasts_fast_leave(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) { - char *val = NULL; - - dmuci_get_value_by_section_string((struct uci_section *)data, "fast_leave", &val); - *value = (val && DM_STRCMP(val, "1") == 0) ? "true" : "false"; + *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "fast_leave", "1"); return 0; } @@ -910,7 +907,7 @@ int set_mcasts_fast_leave(char *refparam, struct dmctx *ctx, void *data, char *i int get_mcast_snooping_robustness(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) { - *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "robustness", "0"); + *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "robustness", "2"); return 0; } @@ -1446,7 +1443,7 @@ static int get_igmpp_cgrp_stats_lrcvd(char *refparam, struct dmctx *ctx, void *d int get_mcast_proxy_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) { - *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "enable", "1"); + *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "enable", "0"); return 0; } int set_mcast_proxy_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action) @@ -1469,25 +1466,25 @@ int set_mcast_proxy_enable(char *refparam, struct dmctx *ctx, void *data, char * int get_mcast_proxy_robustness(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) { - *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "robustness", "0"); + *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "robustness", "2"); return 0; } int get_mcastp_query_interval(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) { - *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "query_interval", "0"); + *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "query_interval", "125"); return 0; } int get_mcastp_q_response_interval(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) { - *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "query_response_interval", "0"); + *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "query_response_interval", "100"); return 0; } int get_mcastp_last_mq_interval(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) { - *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "last_member_query_interval", "0"); + *value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "last_member_query_interval", "10"); return 0; } diff --git a/dmtree/vendor/iopsys/tr181/x_iopsys_eu_mld.c b/dmtree/vendor/iopsys/tr181/x_iopsys_eu_mld.c index c8d75533..278ef6ab 100644 --- a/dmtree/vendor/iopsys/tr181/x_iopsys_eu_mld.c +++ b/dmtree/vendor/iopsys/tr181/x_iopsys_eu_mld.c @@ -169,7 +169,7 @@ static int get_mld_version(char *refparam, struct dmctx *ctx, void *data, char * { char *val; dmuci_get_value_by_section_string((struct uci_section *)data, "version", &val); - *value = (DM_STRCMP(val, "2") == 0) ? "V2" : "V1"; + *value = (DM_STRCMP(val, "1") == 0) ? "V1" : "V2"; return 0; }