[ovs-dev] [PATCH ovn] pinctrl: Update icmp6 header structures.

Ilya Maximets i.maximets at ovn.org
Thu Oct 10 09:43:53 UTC 2019


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 at 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)) {
-- 
2.17.1



More information about the dev mailing list