From 922b3bab9235766934aa60712b1dbad2a17612ae Mon Sep 17 00:00:00 2001 From: Mehak Mahajan Date: Tue, 7 Aug 2012 12:40:23 -0700 Subject: [PATCH] Adding checksum to ICMP packets created by OVS for testing. OVS provides a utility to create ICMP packets for the purpose of testing using ovs-appctl netdev-dummy/receive. These packets created by flow_compose() earlier did not have the ICMP checksum in them. With this commit, the checksum will be added to these test ICMP packets. Signed-off-by: Mehak Mahajan --- lib/flow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/flow.c b/lib/flow.c index 59158ac0..5d2f33ca 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -1066,6 +1066,7 @@ flow_compose(struct ofpbuf *b, const struct flow *flow) b->l4 = icmp = ofpbuf_put_zeros(b, sizeof *icmp); icmp->icmp_type = ntohs(flow->tp_src); icmp->icmp_code = ntohs(flow->tp_dst); + icmp->icmp_csum = csum(icmp, ICMP_HEADER_LEN); } } -- 2.30.2