On Fri, Sep 28, 2018 at 02:23:30PM -0400, Murali Karicheri wrote:
> From: Hongmei Gou <[email protected]>
> 
> When ip -d link command is executed with prp interface setup,
> it encounters a segmentation fault. This causes snmpwalk command
> to time out since it uses the above command to list the
> interfaces. This patch fixes the issue.
> 
> Upstream-Status: Pending

Wrong place.


> Signed-off-by: Murali Karicheri <[email protected]>
> Signed-off-by: Hongmei Gou <[email protected]>
> ---
>  ...able-display-for-vlan-params-in-ip-d-link.patch | 63 
> ++++++++++++++++++++++
>  .../iproute2/0002-prp-invalid-maxattr.patch        | 29 ++++++++++
>  .../iproute2/iproute2_4.11.0.bbappend              |  4 +-
>  3 files changed, 95 insertions(+), 1 deletion(-)
>  create mode 100644 
> meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
>  create mode 100644 
> meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch
> 
> diff --git 
> a/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
>  
> b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
> new file mode 100644
> index 0000000..cb5a6b9
> --- /dev/null
> +++ 
> b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
> @@ -0,0 +1,63 @@
> +From b893b6e581785fd4a458d5cf1a8178e858636db2 Mon Sep 17 00:00:00 2001
> +From: Murali Karicheri <[email protected]>
> +Date: Thu, 27 Sep 2018 11:56:00 -0400
> +Subject: [PATCH 1/2] hsr/prp: disable display for vlan params in ip -d link
> + command
> +
> +Seeing a crash with ip -d link command for prp. Disable it for now
> +as a trial to check if that is causing the segmentation fault
> +for prp. These values are not coming from kernel anyways. So it
> +doesn't correctly display it currently. So this has no impact on
> +the functionality. Can add it later once kernel provide the right
> +values in the response.
> +
> +Signed-off-by: Murali Karicheri <[email protected]>
> +---
> + ip/iplink_hsr.c | 9 ---------
> + ip/iplink_prp.c | 9 ---------
> + 2 files changed, 18 deletions(-)
> +
> +diff --git a/ip/iplink_hsr.c b/ip/iplink_hsr.c
> +index 34e91679..e713cb7b 100644
> +--- a/ip/iplink_hsr.c
> ++++ b/ip/iplink_hsr.c
> +@@ -180,15 +180,6 @@ static void hsr_print_opt(struct link_util *lu, FILE 
> *f, struct rtattr *tb[])
> +                                 RTA_PAYLOAD(tb[IFLA_HSR_SUPERVISION_ADDR]),
> +                                 ARPHRD_VOID,
> +                                 b1, sizeof(b1)));
> +-    if (tb[IFLA_HSR_SV_VID])
> +-            fprintf(f, "SV_VID %d ",
> +-                    rta_getattr_u16(tb[IFLA_HSR_SV_VID]));
> +-    if (tb[IFLA_HSR_SV_PCP])
> +-            fprintf(f, "SV_PCP %d ",
> +-                    rta_getattr_u8(tb[IFLA_HSR_SV_PCP]));
> +-    if (tb[IFLA_HSR_SV_CFI])
> +-            fprintf(f, "SV_CFI %d ",
> +-                    rta_getattr_u8(tb[IFLA_HSR_SV_CFI]));
> + }
> + 
> + static void hsr_print_help(struct link_util *lu, int argc, char **argv,
> +diff --git a/ip/iplink_prp.c b/ip/iplink_prp.c
> +index e25ae82d..b09528a5 100644
> +--- a/ip/iplink_prp.c
> ++++ b/ip/iplink_prp.c
> +@@ -170,15 +170,6 @@ static void prp_print_opt(struct link_util *lu, FILE 
> *f, struct rtattr *tb[])
> +                                 RTA_PAYLOAD(tb[IFLA_PRP_SUPERVISION_ADDR]),
> +                                 ARPHRD_VOID,
> +                                 b1, sizeof(b1)));
> +-    if (tb[IFLA_PRP_SV_VID])
> +-            fprintf(f, "SV_VID %d ",
> +-                    rta_getattr_u16(tb[IFLA_PRP_SV_VID]));
> +-    if (tb[IFLA_PRP_SV_PCP])
> +-            fprintf(f, "SV_PCP %d ",
> +-                    rta_getattr_u8(tb[IFLA_PRP_SV_PCP]));
> +-    if (tb[IFLA_PRP_SV_CFI])
> +-            fprintf(f, "SV_CFI %d ",
> +-                    rta_getattr_u8(tb[IFLA_PRP_SV_CFI]));
> + }
> + 
> + static void prp_print_help(struct link_util *lu, int argc, char **argv,
> +-- 
> +2.17.0
> +
> +
> diff --git 
> a/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch
>  
> b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch
> new file mode 100644
> index 0000000..cfd0106
> --- /dev/null
> +++ 
> b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch
> @@ -0,0 +1,29 @@
> +From 755328f9c9d45149cad1a8e6c371d2020b99f18e Mon Sep 17 00:00:00 2001
> +From: Murali Karicheri <[email protected]>
> +Date: Thu, 27 Sep 2018 14:54:48 -0400
> +Subject: [PATCH 2/2] prp: invalid maxattr
> +
> +Fix the cut and paste error of using IFLA_VLAN_MAX instead of IFLA_PRP_MAX.
> +
> +Signed-off-by: Murali Karicheri <[email protected]>
> +---
> + ip/iplink_prp.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/ip/iplink_prp.c b/ip/iplink_prp.c
> +index b09528a5..beef603b 100644
> +--- a/ip/iplink_prp.c
> ++++ b/ip/iplink_prp.c
> +@@ -180,7 +180,7 @@ static void prp_print_help(struct link_util *lu, int 
> argc, char **argv,
> + 
> + struct link_util prp_link_util = {
> +     .id             = "prp",
> +-    .maxattr        = IFLA_VLAN_MAX,
> ++    .maxattr        = IFLA_PRP_MAX,
> +     .parse_opt      = prp_parse_opt,
> +     .print_opt      = prp_print_opt,
> +     .print_help     = prp_print_help,
> +-- 
> +2.17.0
> +
> +
> diff --git 
> a/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend 
> b/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend
> index 2b2d6d2..26949c4 100644
> --- a/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend
> +++ b/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend
> @@ -1,4 +1,4 @@
> -PR_append = ".arago2"
> +PR_append = ".arago3"
>  
>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>  
> @@ -6,4 +6,6 @@ SRC_URI_append = " \
>             file://0001-add-support-for-prp-similar-to-hsr.patch \
>             file://0001-hsr-prp-add-support-for-vlan-tagged-sv-frames.patch \
>             file://0001-hsr-prp-remove-the-debug-print-from-the-code.patch \
> +           
> file://0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch \
> +           file://0002-prp-invalid-maxattr.patch \
>            "
> -- 1.9.1
> 
> _______________________________________________
> meta-arago mailing list
> [email protected]
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to