CSIT-384: IPSEC IPv6 negative test cases
[csit.git] / tests / func / ipsec / ipsec_transport_mode_ipv6.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 IPv6 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 | *IPv6 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 IPv6 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_ip6}= | 3ffe:5f::1
42 | ${dut_if_ip6}= | 3ffe:5f::2
43 | ${tg_lo_ip6}= | 3ffe:60::3
44 | ${dut_lo_ip6}= | 3ffe:60::4
45 | ${ip6_plen}= | ${64}
46 | ${ip6_plen_rt}= | ${128}
47
48 *** Test Cases ***
49 | TC01: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA1-96 integrity
50 | | [Documentation]
51 | | ... | [Top] TG-DUT1.
52 | | ... | [Ref] RFC4303.
53 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
54 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA1-96 in transport
55 | | ... | mode.
56 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
57 | | ${encr_alg}= | Crypto Alg AES CBC 128
58 | | ${auth_alg}= | Integ Alg SHA1 96
59 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
60 | | When VPP Setup IPsec Manual Keyed Connection
61 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
62 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
63 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
64 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
65 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
66
67 | TC02: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA1-96 integrity
68 | | [Documentation]
69 | | ... | [Top] TG-DUT1.
70 | | ... | [Ref] RFC4303.
71 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
72 | | ... | algorithm AES-CBC-192 and integrity algorithm SHA1-96 in transport
73 | | ... | mode.
74 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
75 | | [Tags] | SKIP_PATCH
76 | | ${encr_alg}= | Crypto Alg AES CBC 192
77 | | ${auth_alg}= | Integ Alg SHA1 96
78 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
79 | | When VPP Setup IPsec Manual Keyed Connection
80 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
81 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
82 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
83 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
84 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
85
86 | TC03: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA1-96 integrity
87 | | [Documentation]
88 | | ... | [Top] TG-DUT1.
89 | | ... | [Ref] RFC4303.
90 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
91 | | ... | algorithm AES-CBC-256 and integrity algorithm SHA1-96 in transport
92 | | ... | mode.
93 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
94 | | [Tags] | SKIP_PATCH
95 | | ${encr_alg}= | Crypto Alg AES CBC 256
96 | | ${auth_alg}= | Integ Alg SHA1 96
97 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
98 | | When VPP Setup IPsec Manual Keyed Connection
99 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
100 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
101 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
102 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
103 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
104
105 | TC04: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-256-128 integrity
106 | | [Documentation]
107 | | ... | [Top] TG-DUT1.
108 | | ... | [Ref] RFC4303.
109 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
110 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA-256-128 in transport
111 | | ... | mode.
112 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
113 | | [Tags] | SKIP_PATCH
114 | | ${encr_alg}= | Crypto Alg AES CBC 128
115 | | ${auth_alg}= | Integ Alg SHA 256 128
116 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
117 | | When VPP Setup IPsec Manual Keyed Connection
118 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
119 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
120 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
121 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
122 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
123
124 | TC05: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-256-128 integrity
125 | | [Documentation]
126 | | ... | [Top] TG-DUT1.
127 | | ... | [Ref] RFC4303.
128 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
129 | | ... | algorithm AES-CBC-192 and integrity algorithm SHA-256-128 in transport
130 | | ... | mode.
131 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
132 | | ${encr_alg}= | Crypto Alg AES CBC 192
133 | | ${auth_alg}= | Integ Alg SHA 256 128
134 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
135 | | When VPP Setup IPsec Manual Keyed Connection
136 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
137 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
138 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
139 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
140 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
141
142 | TC06: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-256-128 integrity
143 | | [Documentation]
144 | | ... | [Top] TG-DUT1.
145 | | ... | [Ref] RFC4303.
146 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
147 | | ... | algorithm AES-CBC-256 and integrity algorithm SHA-256-128 in transport
148 | | ... | mode.
149 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
150 | | [Tags] | SKIP_PATCH
151 | | ${encr_alg}= | Crypto Alg AES CBC 256
152 | | ${auth_alg}= | Integ Alg SHA 256 128
153 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
154 | | When VPP Setup IPsec Manual Keyed Connection
155 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
156 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
157 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
158 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
159 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
160
161 | TC07: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-384-192 integrity
162 | | [Documentation]
163 | | ... | [Top] TG-DUT1.
164 | | ... | [Ref] RFC4303.
165 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
166 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA-384-192 in transport
167 | | ... | mode.
168 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
169 | | [Tags] | SKIP_PATCH
170 | | ${encr_alg}= | Crypto Alg AES CBC 128
171 | | ${auth_alg}= | Integ Alg SHA 384 192
172 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
173 | | When VPP Setup IPsec Manual Keyed Connection
174 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
175 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
176 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
177 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
178 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
179
180 | TC08: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-384-192 integrity
181 | | [Documentation]
182 | | ... | [Top] TG-DUT1.
183 | | ... | [Ref] RFC4303.
184 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
185 | | ... | algorithm AES-CBC-192 and integrity algorithm SHA-384-192 in transport
186 | | ... | mode.
187 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
188 | | [Tags] | SKIP_PATCH
189 | | ${encr_alg}= | Crypto Alg AES CBC 192
190 | | ${auth_alg}= | Integ Alg SHA 384 192
191 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
192 | | When VPP Setup IPsec Manual Keyed Connection
193 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
194 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
195 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
196 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
197 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
198
199 | TC09: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-384-192 integrity
200 | | [Documentation]
201 | | ... | [Top] TG-DUT1.
202 | | ... | [Ref] RFC4303.
203 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
204 | | ... | algorithm AES-CBC-256 and integrity algorithm SHA-384-192 in transport
205 | | ... | mode.
206 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
207 | | ${encr_alg}= | Crypto Alg AES CBC 256
208 | | ${auth_alg}= | Integ Alg SHA 384 192
209 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
210 | | When VPP Setup IPsec Manual Keyed Connection
211 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
212 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
213 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
214 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
215 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
216
217 | TC10: VPP process ESP packet in Transport Mode with AES-CBC-128 encryption and SHA-512-256 integrity
218 | | [Documentation]
219 | | ... | [Top] TG-DUT1.
220 | | ... | [Ref] RFC4303.
221 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
222 | | ... | algorithm AES-CBC-128 and integrity algorithm SHA-512-256 in transport
223 | | ... | mode.
224 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
225 | | [Tags] | SKIP_PATCH
226 | | ${encr_alg}= | Crypto Alg AES CBC 128
227 | | ${auth_alg}= | Integ Alg SHA 512 256
228 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
229 | | When VPP Setup IPsec Manual Keyed Connection
230 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
231 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
232 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
233 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
234 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
235
236 | TC11: VPP process ESP packet in Transport Mode with AES-CBC-192 encryption and SHA-512-256 integrity
237 | | [Documentation]
238 | | ... | [Top] TG-DUT1.
239 | | ... | [Ref] RFC4303.
240 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
241 | | ... | algorithm AES-CBC-192 and integrity algorithm SHA-512-256 in transport
242 | | ... | mode.
243 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
244 | | [Tags] | SKIP_PATCH
245 | | ${encr_alg}= | Crypto Alg AES CBC 192
246 | | ${auth_alg}= | Integ Alg SHA 512 256
247 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
248 | | When VPP Setup IPsec Manual Keyed Connection
249 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
250 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
251 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
252 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
253 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
254
255 | TC12: VPP process ESP packet in Transport Mode with AES-CBC-256 encryption and SHA-512-256 integrity
256 | | [Documentation]
257 | | ... | [Top] TG-DUT1.
258 | | ... | [Ref] RFC4303.
259 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
260 | | ... | algorithm AES-CBC-256 and integrity algorithm SHA-512-256 in transport
261 | | ... | mode.
262 | | ... | [Ver] Send and receive ESP packet between TG and VPP node.
263 | | ${encr_alg}= | Crypto Alg AES CBC 256
264 | | ${auth_alg}= | Integ Alg SHA 512 256
265 | | Given IPsec Generate Keys | ${encr_alg} | ${auth_alg}
266 | | When VPP Setup IPsec Manual Keyed Connection
267 | | ... | ${dut_node} | ${dut_if} | ${encr_alg} | ${encr_key} | ${auth_alg}
268 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${dut_tun_ip} | ${tg_tun_ip}
269 | | Then Send And Receive IPsec Packet | ${tg_node} | ${tg_if} | ${dut_if_mac}
270 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
271 | | ... | ${dut_spi} | ${tg_tun_ip} | ${dut_tun_ip}
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}