CSIT-383: IPSEC IPv4 negative test cases
[csit.git] / tests / func / ipsec / ipsec_transport_mode_ipv4.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/ipsec.robot
16 | Library | resources.libraries.python.Trace
17 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
18 | ...        | VM_ENV | HW_ENV
19 | Test Setup | Run Keywords | Setup all DUTs before test
20 | ...        | AND          | Setup all TGs before traffic script
21 | ...        | AND          | Setup Topology for IPv4 IPsec testing
22 | Test Teardown | Run Keywords | VPP IPsec Show | ${dut_node}
23 | ...           | AND          | Show Packet Trace on All DUTs | ${nodes}
24 | ...           | AND          | Show Vpp Errors on All DUTs
25 | ...           | AND          | Show vpp trace dump on all DUTs
26 | Documentation | *IPv4 IPsec transport mode test suite.*
27 | ...
28 | ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\
29 | ... | between nodes.
30 | ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure\
31 | ... | loopback an physical interface IPv4 addresses, static ARP record, route\
32 | ... | and IPsec manual keyed connection in transport mode.
33 | ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet\
34 | ... | is received on TG from DUT1.
35 | ... | *[Ref] Applicable standard specifications:* RFC4303.
36
37 *** Variables ***
38 | ${tg_spi}= | ${1000}
39 | ${dut_spi}= | ${1001}
40 | ${ESP_PROTO}= | ${50}
41 | ${tg_if_ip4}= | 192.168.100.2
42 | ${dut_if_ip4}= | 192.168.100.3
43 | ${tg_lo_ip4}= | 192.168.3.3
44 | ${dut_lo_ip4}= | 192.168.4.4
45 | ${ip4_plen}= | ${24}
46
47 *** Test Cases ***
48 | TC01: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity
49 | | [Documentation]
50 | | ... | [Top] TG-DUT1.
51 | | ... | [Ref] RFC4303.
52 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
53 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport
54 | | ... | mode.
55 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
56 | | ${encr_alg}= | Crypto Alg AES CBC 128
57 | | ${auth_alg}= | Integ Alg SHA1 96
58 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
59 | | When VPP Setup IPsec Manual Keyed Connection
60 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
61 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
62 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
63 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
64 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
65
66 | TC02: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA1-96 integrity
67 | | [Documentation]
68 | | ... | [Top] TG-DUT1.
69 | | ... | [Ref] RFC4303.
70 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
71 | | ... | algorithm AES-CBC-192 and integrity algorithm SHA1-96 in transport
72 | | ... | mode.
73 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
74 | | [Tags] | SKIP_PATCH
75 | | ${encr_alg}= | Crypto Alg AES CBC 192
76 | | ${auth_alg}= | Integ Alg SHA1 96
77 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
78 | | When VPP Setup IPsec Manual Keyed Connection
79 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
80 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
81 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
82 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
83 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
84
85 | TC03: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA1-96 integrity
86 | | [Documentation]
87 | | ... | [Top] TG-DUT1.
88 | | ... | [Ref] RFC4303.
89 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
90 | | ... | algorithm AES-CBC-256 and integrity algorithm SHA1-96 in transport
91 | | ... | mode.
92 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
93 | | [Tags] | SKIP_PATCH
94 | | ${encr_alg}= | Crypto Alg AES CBC 256
95 | | ${auth_alg}= | Integ Alg SHA1 96
96 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
97 | | When VPP Setup IPsec Manual Keyed Connection
98 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
99 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
100 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
101 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
102 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
103
104 | TC04: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-256-128 integrity
105 | | [Documentation]
106 | | ... | [Top] TG-DUT1.
107 | | ... | [Ref] RFC4303.
108 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
109 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA-256-128 in transport
110 | | ... | mode.
111 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
112 | | [Tags] | SKIP_PATCH
113 | | ${encr_alg}= | Crypto Alg AES CBC 128
114 | | ${auth_alg}= | Integ Alg SHA 256 128
115 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
116 | | When VPP Setup IPsec Manual Keyed Connection
117 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
118 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
119 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
120 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
121 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
122
123 | TC05: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-256-128 integrity
124 | | [Documentation]
125 | | ... | [Top] TG-DUT1.
126 | | ... | [Ref] RFC4303.
127 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
128 | | ... | algorithm AES-CBC-192 and integrity algorithm SHA-256-128 in transport
129 | | ... | mode.
130 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
131 | | ${encr_alg}= | Crypto Alg AES CBC 192
132 | | ${auth_alg}= | Integ Alg SHA 256 128
133 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
134 | | When VPP Setup IPsec Manual Keyed Connection
135 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
136 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
137 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
138 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
139 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
140
141 | TC06: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-256-128 integrity
142 | | [Documentation]
143 | | ... | [Top] TG-DUT1.
144 | | ... | [Ref] RFC4303.
145 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
146 | | ... | algorithm AES-CBC-256 and integrity algorithm SHA-256-128 in transport
147 | | ... | mode.
148 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
149 | | [Tags] | SKIP_PATCH
150 | | ${encr_alg}= | Crypto Alg AES CBC 256
151 | | ${auth_alg}= | Integ Alg SHA 256 128
152 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
153 | | When VPP Setup IPsec Manual Keyed Connection
154 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
155 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
156 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
157 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
158 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
159
160 | TC07: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-384-192 integrity
161 | | [Documentation]
162 | | ... | [Top] TG-DUT1.
163 | | ... | [Ref] RFC4303.
164 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
165 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA-384-192 in transport
166 | | ... | mode.
167 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
168 | | [Tags] | SKIP_PATCH
169 | | ${encr_alg}= | Crypto Alg AES CBC 128
170 | | ${auth_alg}= | Integ Alg SHA 384 192
171 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
172 | | When VPP Setup IPsec Manual Keyed Connection
173 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
174 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
175 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
176 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
177 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
178
179 | TC08: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-384-192 integrity
180 | | [Documentation]
181 | | ... | [Top] TG-DUT1.
182 | | ... | [Ref] RFC4303.
183 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
184 | | ... | algorithm AES-CBC-192 and integrity algorithm SHA-384-192 in transport
185 | | ... | mode.
186 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
187 | | [Tags] | SKIP_PATCH
188 | | ${encr_alg}= | Crypto Alg AES CBC 192
189 | | ${auth_alg}= | Integ Alg SHA 384 192
190 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
191 | | When VPP Setup IPsec Manual Keyed Connection
192 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
193 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
194 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
195 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
196 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
197
198 | TC09: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-384-192 integrity
199 | | [Documentation]
200 | | ... | [Top] TG-DUT1.
201 | | ... | [Ref] RFC4303.
202 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
203 | | ... | algorithm AES-CBC-256 and integrity algorithm SHA-384-192 in transport
204 | | ... | mode.
205 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
206 | | ${encr_alg}= | Crypto Alg AES CBC 256
207 | | ${auth_alg}= | Integ Alg SHA 384 192
208 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
209 | | When VPP Setup IPsec Manual Keyed Connection
210 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
211 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
212 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
213 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
214 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
215
216 | TC10: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-512-256 integrity
217 | | [Documentation]
218 | | ... | [Top] TG-DUT1.
219 | | ... | [Ref] RFC4303.
220 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
221 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA-512-256 in transport
222 | | ... | mode.
223 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
224 | | [Tags] | SKIP_PATCH
225 | | ${encr_alg}= | Crypto Alg AES CBC 128
226 | | ${auth_alg}= | Integ Alg SHA 512 256
227 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
228 | | When VPP Setup IPsec Manual Keyed Connection
229 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
230 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
231 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
232 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
233 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
234
235 | TC11: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-512-256 integrity
236 | | [Documentation]
237 | | ... | [Top] TG-DUT1.
238 | | ... | [Ref] RFC4303.
239 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
240 | | ... | algorithm AES-CBC-192 and integrity algorithm SHA-512-256 in transport
241 | | ... | mode.
242 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
243 | | [Tags] | SKIP_PATCH
244 | | ${encr_alg}= | Crypto Alg AES CBC 192
245 | | ${auth_alg}= | Integ Alg SHA 512 256
246 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
247 | | When VPP Setup IPsec Manual Keyed Connection
248 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
249 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
250 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
251 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
252 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
253
254 | TC12: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-512-256 integrity
255 | | [Documentation]
256 | | ... | [Top] TG-DUT1.
257 | | ... | [Ref] RFC4303.
258 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
259 | | ... | algorithm AES-CBC-256 and integrity algorithm SHA-512-256 in transport
260 | | ... | mode.
261 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
262 | | ${encr_alg}= | Crypto Alg AES CBC 256
263 | | ${auth_alg}= | Integ Alg SHA 512 256
264 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
265 | | When VPP Setup IPsec Manual Keyed Connection
266 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
267 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
268 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
269 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
270 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
271
272
273 | TC13: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption alogrithms used
274 | | [Documentation]
275 | | ... | [Top] TG-DUT1.
276 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
277 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\
278 | | ... | mode.
279 | | ... | [Ver] Send an ESP packet encrypted by encryption key different from\
280 | | ... | encryption key stored on VPP node from TG to VPP node and expect no\
281 | | ... | response to be received on TG.
282 | | ... | [Ref] RFC4303.
283 | | ${encr_alg}= | Crypto Alg AES CBC 128
284 | | ${auth_alg}= | Integ Alg SHA1 96
285 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
286 | | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto
287 | | When VPP Setup IPsec Manual Keyed Connection
288 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
289 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
290 | | Then Run Keyword And Expect Error | ESP packet Rx timeout
291 | | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
292 | | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key} | ${tg_spi}
293 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
294
295 | TC14: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different integrity alogrithms used
296 | | [Documentation]
297 | | ... | [Top] TG-DUT1.
298 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
299 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\
300 | | ... | mode.
301 | | ... | [Ver] Send an ESP packet authenticated by integrity key different\
302 | | ... | from integrity key stored on VPP node from TG to VPP node and expect\
303 | | ... | no response to be received on TG.
304 | | ... | [Ref] RFC4303.
305 | | ${encr_alg}= | Crypto Alg AES CBC 128
306 | | ${auth_alg}= | Integ Alg SHA1 96
307 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
308 | | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ
309 | | When VPP Setup IPsec Manual Keyed Connection
310 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
311 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
312 | | Then Run Keyword And Expect Error | ESP packet Rx timeout
313 | | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
314 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key2} | ${tg_spi}
315 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
316
317 | TC15: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity - different encryption and integrity alogrithms used
318 | | [Documentation]
319 | | ... | [Top] TG-DUT1.
320 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
321 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport\
322 | | ... | mode.
323 | | ... | [Ver] Send an ESP packet authenticated by integrity key and encrypted\
324 | | ... | by encryption key different from integrity and encryption keys stored\
325 | | ... | on VPP node from TG to VPP node and expect no response to be received\
326 | | ... | on TG.
327 | | ... | [Ref] RFC4303.
328 | | ${encr_alg}= | Crypto Alg AES CBC 128
329 | | ${auth_alg}= | Integ Alg SHA1 96
330 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
331 | | ${encr_key2}= | And Get Second Random String | ${encr_alg} | Crypto
332 | | ${auth_key2}= | And Get Second Random String | ${auth_alg} | Integ
333 | | When VPP Setup IPsec Manual Keyed Connection
334 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
335 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
336 | | Then Run Keyword And Expect Error | ESP packet Rx timeout
337 | | ... | Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
338 | | ... | ${encr_alg} | ${encr_key2} | ${auth_alg} | ${auth_key2} | ${tg_spi}
339 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
340
341 *** Keywords ***
342 | Get Second Random String
343 | | [Arguments] | ${req_alg} | ${req_type}
344 | | ${req_key_len}= | Run Keyword | Get ${req_type} Alg Key Len | ${req_alg}
345 | | :FOR | ${index} | IN RANGE | 100
346 | | | ${req_key}= | Generate Random String | ${req_key_len}
347 | | | Return From Keyword If | '${req_key}' != '${encr_key}' | ${req_key}