[ovs-dev,ovn] pinctrl: Update icmp6 header structures.
diff mbox series

Message ID 20191010094353.28389-1-i.maximets@ovn.org
State Accepted
Headers show
Series
  • [ovs-dev,ovn] pinctrl: Update icmp6 header structures.
Related show

Commit Message

Ilya Maximets Oct. 10, 2019, 9:43 a.m. UTC
commit 361a47d66 ("flow: Fix using pointer to member of packed struct icmp6_hdr.")
in OVS updated 'struct icmp6_error_header' with renaming it to
'struct icmp6_data_header'.

OVN should update names of a structure and constants accordingly.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---

This is a copy-paste from the OVS 2.12 branch.
I didn't try to compile this with code from OVN repo.

 controller/pinctrl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Mark Michelson Oct. 10, 2019, 8:22 p.m. UTC | #1
Thanks, Ilya, I just ran into this problem when trying to OVN :)

Acked-by: Mark Michelson <mmichels@redhat.com>

On 10/10/19 5:43 AM, Ilya Maximets wrote:
> commit 361a47d66 ("flow: Fix using pointer to member of packed struct icmp6_hdr.")
> in OVS updated 'struct icmp6_error_header' with renaming it to
> 'struct icmp6_data_header'.
> 
> OVN should update names of a structure and constants accordingly.
> 
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> ---
> 
> This is a copy-paste from the OVS 2.12 branch.
> I didn't try to compile this with code from OVN repo.
> 
>   controller/pinctrl.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/controller/pinctrl.c b/controller/pinctrl.c
> index 11cac4f43..3cbfb0f4a 100644
> --- a/controller/pinctrl.c
> +++ b/controller/pinctrl.c
> @@ -838,14 +838,14 @@ pinctrl_handle_icmp(struct rconn *swconn, const struct flow *ip_flow,
>           }
>       } else {
>           struct ip6_hdr *nh = dp_packet_put_zeros(&packet, sizeof *nh);
> -        struct icmp6_error_header *ih;
> +        struct icmp6_data_header *ih;
>           uint32_t icmpv6_csum;
>   
>           eh->eth_type = htons(ETH_TYPE_IPV6);
>           dp_packet_set_l3(&packet, nh);
>           nh->ip6_vfc = 0x60;
>           nh->ip6_nxt = IPPROTO_ICMPV6;
> -        nh->ip6_plen = htons(sizeof(*nh) + ICMP6_ERROR_HEADER_LEN);
> +        nh->ip6_plen = htons(sizeof(*nh) + ICMP6_DATA_HEADER_LEN);
>           packet_set_ipv6(&packet, &ip_flow->ipv6_src, &ip_flow->ipv6_dst,
>                           ip_flow->nw_tos, ip_flow->ipv6_label, 255);
>   
> @@ -861,7 +861,7 @@ pinctrl_handle_icmp(struct rconn *swconn, const struct flow *ip_flow,
>           icmpv6_csum = packet_csum_pseudoheader6(dp_packet_l3(&packet));
>           ih->icmp6_base.icmp6_cksum = csum_finish(
>               csum_continue(icmpv6_csum, ih,
> -                          sizeof(*nh) + ICMP6_ERROR_HEADER_LEN));
> +                          sizeof(*nh) + ICMP6_DATA_HEADER_LEN));
>       }
>   
>       if (ip_flow->vlans[0].tci & htons(VLAN_CFI)) {
>
Han Zhou Oct. 11, 2019, 12:34 a.m. UTC | #2
Thanks Ilya and Mark. I verified the compiling and tests, and applied to
master.

On Thu, Oct 10, 2019 at 1:23 PM Mark Michelson <mmichels@redhat.com> wrote:

> Thanks, Ilya, I just ran into this problem when trying to OVN :)
>
> Acked-by: Mark Michelson <mmichels@redhat.com>
>
> On 10/10/19 5:43 AM, Ilya Maximets wrote:
> > commit 361a47d66 ("flow: Fix using pointer to member of packed struct
> icmp6_hdr.")
> > in OVS updated 'struct icmp6_error_header' with renaming it to
> > 'struct icmp6_data_header'.
> >
> > OVN should update names of a structure and constants accordingly.
> >
> > Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> > ---
> >
> > This is a copy-paste from the OVS 2.12 branch.
> > I didn't try to compile this with code from OVN repo.
> >
> >   controller/pinctrl.c | 6 +++---
> >   1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/controller/pinctrl.c b/controller/pinctrl.c
> > index 11cac4f43..3cbfb0f4a 100644
> > --- a/controller/pinctrl.c
> > +++ b/controller/pinctrl.c
> > @@ -838,14 +838,14 @@ pinctrl_handle_icmp(struct rconn *swconn, const
> struct flow *ip_flow,
> >           }
> >       } else {
> >           struct ip6_hdr *nh = dp_packet_put_zeros(&packet, sizeof *nh);
> > -        struct icmp6_error_header *ih;
> > +        struct icmp6_data_header *ih;
> >           uint32_t icmpv6_csum;
> >
> >           eh->eth_type = htons(ETH_TYPE_IPV6);
> >           dp_packet_set_l3(&packet, nh);
> >           nh->ip6_vfc = 0x60;
> >           nh->ip6_nxt = IPPROTO_ICMPV6;
> > -        nh->ip6_plen = htons(sizeof(*nh) + ICMP6_ERROR_HEADER_LEN);
> > +        nh->ip6_plen = htons(sizeof(*nh) + ICMP6_DATA_HEADER_LEN);
> >           packet_set_ipv6(&packet, &ip_flow->ipv6_src,
> &ip_flow->ipv6_dst,
> >                           ip_flow->nw_tos, ip_flow->ipv6_label, 255);
> >
> > @@ -861,7 +861,7 @@ pinctrl_handle_icmp(struct rconn *swconn, const
> struct flow *ip_flow,
> >           icmpv6_csum = packet_csum_pseudoheader6(dp_packet_l3(&packet));
> >           ih->icmp6_base.icmp6_cksum = csum_finish(
> >               csum_continue(icmpv6_csum, ih,
> > -                          sizeof(*nh) + ICMP6_ERROR_HEADER_LEN));
> > +                          sizeof(*nh) + ICMP6_DATA_HEADER_LEN));
> >       }
> >
> >       if (ip_flow->vlans[0].tci & htons(VLAN_CFI)) {
> >
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>

Patch
diff mbox series

diff --git a/controller/pinctrl.c b/controller/pinctrl.c
index 11cac4f43..3cbfb0f4a 100644
--- a/controller/pinctrl.c
+++ b/controller/pinctrl.c
@@ -838,14 +838,14 @@  pinctrl_handle_icmp(struct rconn *swconn, const struct flow *ip_flow,
         }
     } else {
         struct ip6_hdr *nh = dp_packet_put_zeros(&packet, sizeof *nh);
-        struct icmp6_error_header *ih;
+        struct icmp6_data_header *ih;
         uint32_t icmpv6_csum;
 
         eh->eth_type = htons(ETH_TYPE_IPV6);
         dp_packet_set_l3(&packet, nh);
         nh->ip6_vfc = 0x60;
         nh->ip6_nxt = IPPROTO_ICMPV6;
-        nh->ip6_plen = htons(sizeof(*nh) + ICMP6_ERROR_HEADER_LEN);
+        nh->ip6_plen = htons(sizeof(*nh) + ICMP6_DATA_HEADER_LEN);
         packet_set_ipv6(&packet, &ip_flow->ipv6_src, &ip_flow->ipv6_dst,
                         ip_flow->nw_tos, ip_flow->ipv6_label, 255);
 
@@ -861,7 +861,7 @@  pinctrl_handle_icmp(struct rconn *swconn, const struct flow *ip_flow,
         icmpv6_csum = packet_csum_pseudoheader6(dp_packet_l3(&packet));
         ih->icmp6_base.icmp6_cksum = csum_finish(
             csum_continue(icmpv6_csum, ih,
-                          sizeof(*nh) + ICMP6_ERROR_HEADER_LEN));
+                          sizeof(*nh) + ICMP6_DATA_HEADER_LEN));
     }
 
     if (ip_flow->vlans[0].tci & htons(VLAN_CFI)) {