From: Peter Mikus Date: Wed, 13 Nov 2019 14:37:51 +0000 (+0000) Subject: FIX: Ipsec perf X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=commitdiff_plain;h=f23b0e351a7a55576031c78b3ec618f6284e7712 FIX: Ipsec perf Signed-off-by: Peter Mikus Change-Id: I6e3ce086978c383303724d989702b1c1273c50c0 --- diff --git a/resources/libraries/python/IPsecUtil.py b/resources/libraries/python/IPsecUtil.py index c109f417e5..4578b43987 100644 --- a/resources/libraries/python/IPsecUtil.py +++ b/resources/libraries/python/IPsecUtil.py @@ -821,10 +821,14 @@ class IPsecUtil(object): 'exec create loopback interface\n' 'exec set interface state loop0 up\n' 'exec set interface ip address {uifc} {iaddr}/{mask}\n' + 'exec set ip arp {uifc} {raddr}/32 {rmac} static\n' .format( iaddr=if2_ip - 1, + raddr=if2_ip, uifc=Topology.get_interface_name( nodes['DUT1'], if1_key), + rmac=Topology.get_interface_mac( + nodes['DUT2'], if2_key), mask=96 if if2_ip.version == 6 else 24)) tmp_f2.write( 'exec set interface ip address {uifc} {iaddr}/{mask}\n' @@ -968,6 +972,21 @@ class IPsecUtil(object): err_msg = 'Failed to set IP address on interface {ifc} on host ' \ '{host}'.format(ifc=if1_key, host=nodes['DUT1']['host']) papi_exec.add(cmd1, **args1).get_reply(err_msg) + cmd4 = 'ip_neighbor_add_del' + args4 = dict( + is_add=1, + neighbor=dict( + sw_if_index=Topology.get_interface_sw_index( + nodes['DUT1'], if1_key), + flags=1, + mac_address=str( + Topology.get_interface_mac(nodes['DUT2'], if2_key)), + ip_address=str(ip_address(unicode(if2_ip_addr))) + ) + ) + err_msg = 'Failed to add IP neighbor on interface {ifc}'.format( + ifc=if1_key) + papi_exec.add(cmd4, **args4).get_reply(err_msg) # Configure IPsec tunnel interfaces args1 = dict( sw_if_index=loop_sw_if_idx,