summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/control.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-07-27 00:34:12 -0700
committerDave Barach <openvpp@barachs.net>2017-08-02 00:03:45 +0000
commitfdbc38249a8c672937a74667dcfaafa2cfd292e7 (patch)
tree266d4b90330e508163c560ba01226c3248d5a39c /src/vnet/lisp-cp/control.c
parenta0a908f1dfb679c384ab34ee3c1a2a63ba2448df (diff)
Make ip csum configurable in vlib buffer functions
Also fixes csum computation for lisp control plane 4o6 encapsulated control messages. Change-Id: I991e0b5c0d16dc51e0b5bdc79e1d752270b34765 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/control.c')
-rw-r--r--src/vnet/lisp-cp/control.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vnet/lisp-cp/control.c b/src/vnet/lisp-cp/control.c
index d8a1372d7f0..fc860e14d89 100644
--- a/src/vnet/lisp-cp/control.c
+++ b/src/vnet/lisp-cp/control.c
@@ -2257,7 +2257,7 @@ build_map_request (lisp_cp_main_t * lcm, gid_address_t * deid,
/* push outer ip header */
pkt_push_udp_and_ip (vm, b, LISP_CONTROL_PORT, LISP_CONTROL_PORT, sloc,
- rloc);
+ rloc, 1);
bi_res[0] = bi;
@@ -2283,6 +2283,7 @@ build_encapsulated_map_request (lisp_cp_main_t * lcm,
}
b = vlib_get_buffer (vm, bi);
+ b->flags = 0;
/* leave some space for the encap headers */
vlib_buffer_make_headroom (b, MAX_LISP_MSG_ENCAP_LEN);
@@ -2311,7 +2312,7 @@ build_encapsulated_map_request (lisp_cp_main_t * lcm,
/* push outer ip header */
pkt_push_udp_and_ip (vm, b, LISP_CONTROL_PORT, LISP_CONTROL_PORT, sloc,
- mr_ip);
+ mr_ip, 1);
bi_res[0] = bi;
@@ -2466,7 +2467,7 @@ build_map_register (lisp_cp_main_t * lcm, ip_address_t * sloc,
/* push outer ip header */
pkt_push_udp_and_ip (vm, b, LISP_CONTROL_PORT, LISP_CONTROL_PORT, sloc,
- ms_ip);
+ ms_ip, 1);
bi_res[0] = bi;
return b;
@@ -3650,7 +3651,7 @@ build_map_reply (lisp_cp_main_t * lcm, ip_address_t * sloc,
lisp_msg_put_map_reply (b, records, nonce, probe_bit);
/* push outer ip header */
- pkt_push_udp_and_ip (vm, b, LISP_CONTROL_PORT, dst_port, sloc, dst);
+ pkt_push_udp_and_ip (vm, b, LISP_CONTROL_PORT, dst_port, sloc, dst, 1);
bi_res[0] = bi;
return b;