Wed Nov 25 10:35:07 2020 UTC ()
Use a state of IPCP and IPv6CP to wait for connection established


(yamaguchi)
diff -r1.23 -r1.24 src/tests/net/if_pppoe/t_pppoe.sh

cvs diff -r1.23 -r1.24 src/tests/net/if_pppoe/t_pppoe.sh (expand / switch to unified diff)

--- src/tests/net/if_pppoe/t_pppoe.sh 2020/09/25 06:15:30 1.23
+++ src/tests/net/if_pppoe/t_pppoe.sh 2020/11/25 10:35:07 1.24
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: t_pppoe.sh,v 1.23 2020/09/25 06:15:30 yamaguchi Exp $ 1# $NetBSD: t_pppoe.sh,v 1.24 2020/11/25 10:35:07 yamaguchi Exp $
2# 2#
3# Copyright (c) 2016 Internet Initiative Japan Inc. 3# Copyright (c) 2016 Internet Initiative Japan Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# Redistribution and use in source and binary forms, with or without 6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions 7# modification, are permitted provided that the following conditions
8# are met: 8# are met:
9# 1. Redistributions of source code must retain the above copyright 9# 1. Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer. 10# notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright 11# 2. Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the 12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution. 13# documentation and/or other materials provided with the distribution.
14# 14#
@@ -103,154 +103,157 @@ setup() @@ -103,154 +103,157 @@ setup()
103 rump_server_start $CLIENT netinet6 pppoe 103 rump_server_start $CLIENT netinet6 pppoe
104 104
105 setup_ifaces 105 setup_ifaces
106 106
107 export RUMP_SERVER=$SERVER 107 export RUMP_SERVER=$SERVER
108 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0" 108 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0"
109 unset RUMP_SERVER 109 unset RUMP_SERVER
110 110
111 export RUMP_SERVER=$CLIENT 111 export RUMP_SERVER=$CLIENT
112 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0" 112 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0"
113 unset RUMP_SERVER 113 unset RUMP_SERVER
114} 114}
115 115
116wait_for_session_established() 116wait_for_opened()
117{ 117{
118 local dontfail=$1 118 local cp=$1
 119 local dontfail=$2
119 local n=$WAITTIME 120 local n=$WAITTIME
120 121
121 for i in $(seq $n); do 122 for i in $(seq $n); do
122 $HIJACKING pppoectl -d pppoe0 |grep -q "state = session" 123 $HIJACKING pppoectl -dd pppoe0 | grep -q "$cp state: opened"
123 [ $? = 0 ] && return 124 if [ $? = 0 ]; then
 125 rump.ifconfig -w 10
 126 return
 127 fi
124 sleep 1 128 sleep 1
125 done 129 done
126 130
127 if [ "$dontfail" != "dontfail" ]; then 131 if [ "$dontfail" != "dontfail" ]; then
128 atf_fail "Couldn't connect to the server for $n seconds." 132 atf_fail "Couldn't connect to the server for $n seconds."
129 fi 133 fi
130} 134}
131 135
132wait_for_disconnected() 136wait_for_disconnected()
133{ 137{
134 local dontfail=$1 138 local dontfail=$1
135 local n=$WAITTIME 139 local n=$WAITTIME
136 140
137 for i in $(seq $n); do 141 for i in $(seq $n); do
138 $HIJACKING pppoectl -d pppoe0 | grep -q "state = initial" 142 # If PPPoE client is disconnected by PPPoE server, then
139 [ $? = 0 ] && return 143 # the LCP state will of the client is in a starting to send PADI.
140 # If PPPoE client is disconnected by PPPoE server and then 144 $HIJACKING pppoectl -dd pppoe0 | grep -q \
141 # the client kicks callout of pppoe_timeout(), the client 145 -e "LCP state: initial" -e "LCP state: starting"
142 # state is changed to PPPOE_STATE_PADI_SENT while padi retrying. 
143 $HIJACKING pppoectl -d pppoe0 | grep -q "state = PADI sent" 
144 [ $? = 0 ] && return 146 [ $? = 0 ] && return
145 147
146 sleep 1 148 sleep 1
147 done 149 done
148 150
149 if [ "$dontfail" != "dontfail" ]; then 151 if [ "$dontfail" != "dontfail" ]; then
150 atf_fail "Couldn't disconnect for $n seconds." 152 atf_fail "Couldn't disconnect for $n seconds."
151 fi 153 fi
152} 154}
153 155
154run_test() 156run_test()
155{ 157{
156 local auth=$1 158 local auth=$1
 159 local cp="IPCP"
157 setup 160 setup
158 161
159 # As pppoe client doesn't support rechallenge yet. 162 # As pppoe client doesn't support rechallenge yet.
160 local server_optparam="" 163 local server_optparam=""
161 if [ $auth = "chap" ]; then 164 if [ $auth = "chap" ]; then
162 server_optparam="norechallenge" 165 server_optparam="norechallenge"
163 fi 166 fi
164 167
165 export RUMP_SERVER=$SERVER 168 export RUMP_SERVER=$SERVER
166 local setup_serverparam="pppoectl pppoe0 hisauthproto=$auth \ 169 local setup_serverparam="pppoectl pppoe0 hisauthproto=$auth \
167 'hisauthname=$AUTHNAME' \ 170 'hisauthname=$AUTHNAME' \
168 'hisauthsecret=$SECRET' \ 171 'hisauthsecret=$SECRET' \
169 'myauthproto=none' \ 172 'myauthproto=none' \
170 $server_optparam" 173 $server_optparam"
171 atf_check -s exit:0 -x "$HIJACKING $setup_serverparam" 174 atf_check -s exit:0 -x "$HIJACKING $setup_serverparam"
172 atf_check -s exit:0 rump.ifconfig pppoe0 up 175 atf_check -s exit:0 rump.ifconfig pppoe0 up
173 unset RUMP_SERVER 176 unset RUMP_SERVER
174 177
175 export RUMP_SERVER=$CLIENT 178 export RUMP_SERVER=$CLIENT
176 local setup_clientparam="pppoectl pppoe0 myauthproto=$auth \ 179 local setup_clientparam="pppoectl pppoe0 myauthproto=$auth \
177 'myauthname=$AUTHNAME' \ 180 'myauthname=$AUTHNAME' \
178 'myauthsecret=$SECRET' \ 181 'myauthsecret=$SECRET' \
179 'hisauthproto=none'" 182 'hisauthproto=none'"
180 atf_check -s exit:0 -x "$HIJACKING $setup_clientparam" 183 atf_check -s exit:0 -x "$HIJACKING $setup_clientparam"
181 atf_check -s exit:0 rump.ifconfig pppoe0 up 184 atf_check -s exit:0 rump.ifconfig pppoe0 up
182 $DEBUG && rump.ifconfig 185 $DEBUG && rump.ifconfig
183 wait_for_session_established 186 wait_for_opened $cp
184 atf_check -s exit:0 -o ignore rump.ping -c 1 -w $TIMEOUT $SERVER_IP 187 atf_check -s exit:0 -o ignore rump.ping -c 1 -w $TIMEOUT $SERVER_IP
185 unset RUMP_SERVER 188 unset RUMP_SERVER
186 189
187 # test for disconnection from server 190 # test for disconnection from server
188 export RUMP_SERVER=$SERVER 191 export RUMP_SERVER=$SERVER
189 atf_check -s exit:0 rump.ifconfig pppoe0 down 192 atf_check -s exit:0 rump.ifconfig pppoe0 down
190 wait_for_disconnected 193 wait_for_disconnected
191 export RUMP_SERVER=$CLIENT 194 export RUMP_SERVER=$CLIENT
192 wait_for_disconnected 195 wait_for_disconnected
193 atf_check -s not-exit:0 -o ignore -e ignore \ 196 atf_check -s not-exit:0 -o ignore -e ignore \
194 rump.ping -c 1 -w $TIMEOUT $SERVER_IP 197 rump.ping -c 1 -w $TIMEOUT $SERVER_IP
195 atf_check -s exit:0 -o match:'PADI sent' -x "$HIJACKING pppoectl -d pppoe0" 198 atf_check -s exit:0 -o match:'PADI sent' -x "$HIJACKING pppoectl -d pppoe0"
196 unset RUMP_SERVER 199 unset RUMP_SERVER
197 200
198 # test for reconnecting 201 # test for reconnecting
199 atf_check -s exit:0 -x "env RUMP_SERVER=$SERVER rump.ifconfig pppoe0 up" 202 atf_check -s exit:0 -x "env RUMP_SERVER=$SERVER rump.ifconfig pppoe0 up"
200 export RUMP_SERVER=$CLIENT 203 export RUMP_SERVER=$CLIENT
201 wait_for_session_established 204 wait_for_opened $cp
202 atf_check -s exit:0 -o ignore rump.ping -c 1 -w $TIMEOUT $SERVER_IP 205 atf_check -s exit:0 -o ignore rump.ping -c 1 -w $TIMEOUT $SERVER_IP
203 unset RUMP_SERVER 206 unset RUMP_SERVER
204 207
205 # test for disconnection from client 208 # test for disconnection from client
206 export RUMP_SERVER=$CLIENT 209 export RUMP_SERVER=$CLIENT
207 atf_check -s exit:0 -x rump.ifconfig pppoe0 down 210 atf_check -s exit:0 -x rump.ifconfig pppoe0 down
208 wait_for_disconnected 211 wait_for_disconnected
209 export RUMP_SERVER=$SERVER 212 export RUMP_SERVER=$SERVER
210 wait_for_disconnected 213 wait_for_disconnected
211 $DEBUG && $HIJACKING pppoectl -d pppoe0 214 $DEBUG && $HIJACKING pppoectl -d pppoe0
212 atf_check -s not-exit:0 -o ignore -e ignore \ 215 atf_check -s not-exit:0 -o ignore -e ignore \
213 rump.ping -c 1 -w $TIMEOUT $CLIENT_IP 216 rump.ping -c 1 -w $TIMEOUT $CLIENT_IP
214 atf_check -s exit:0 -o match:'initial' -x "$HIJACKING pppoectl -d pppoe0" 217 atf_check -s exit:0 -o match:'initial' -x "$HIJACKING pppoectl -d pppoe0"
215 unset RUMP_SERVER 218 unset RUMP_SERVER
216 219
217 # test for reconnecting 220 # test for reconnecting
218 export RUMP_SERVER=$CLIENT 221 export RUMP_SERVER=$CLIENT
219 atf_check -s exit:0 -x rump.ifconfig pppoe0 up 222 atf_check -s exit:0 -x rump.ifconfig pppoe0 up
220 wait_for_session_established 223 wait_for_opened $cp
221 $DEBUG && rump.ifconfig pppoe0 224 $DEBUG && rump.ifconfig pppoe0
222 $DEBUG && $HIJACKING pppoectl -d pppoe0 225 $DEBUG && $HIJACKING pppoectl -d pppoe0
223 unset RUMP_SERVER 226 unset RUMP_SERVER
224 227
225 export RUMP_SERVER=$SERVER 228 export RUMP_SERVER=$SERVER
226 atf_check -s exit:0 rump.ifconfig -w 10 229 atf_check -s exit:0 rump.ifconfig -w 10
227 atf_check -s exit:0 -o ignore rump.ping -c 1 -w $TIMEOUT $CLIENT_IP 230 atf_check -s exit:0 -o ignore rump.ping -c 1 -w $TIMEOUT $CLIENT_IP
228 atf_check -s exit:0 -o match:'session' -x "$HIJACKING pppoectl -d pppoe0" 231 atf_check -s exit:0 -o match:'session' -x "$HIJACKING pppoectl -d pppoe0"
229 $DEBUG && HIJACKING pppoectl -d pppoe0 232 $DEBUG && HIJACKING pppoectl -d pppoe0
230 unset RUMP_SERVER 233 unset RUMP_SERVER
231 234
232 # test for invalid password 235 # test for invalid password
233 export RUMP_SERVER=$CLIENT 236 export RUMP_SERVER=$CLIENT
234 atf_check -s exit:0 rump.ifconfig pppoe0 down 237 atf_check -s exit:0 rump.ifconfig pppoe0 down
235 wait_for_disconnected 238 wait_for_disconnected
236 local setup_clientparam="pppoectl pppoe0 myauthproto=$auth \ 239 local setup_clientparam="pppoectl pppoe0 myauthproto=$auth \
237 'myauthname=$AUTHNAME' \ 240 'myauthname=$AUTHNAME' \
238 'myauthsecret=invalidsecret' \ 241 'myauthsecret=invalidsecret' \
239 'hisauthproto=none' \ 242 'hisauthproto=none' \
240 'max-auth-failure=1'" 243 'max-auth-failure=1'"
241 atf_check -s exit:0 -x "$HIJACKING $setup_clientparam" 244 atf_check -s exit:0 -x "$HIJACKING $setup_clientparam"
242 atf_check -s exit:0 rump.ifconfig pppoe0 up 245 atf_check -s exit:0 rump.ifconfig pppoe0 up
243 wait_for_session_established dontfail 246 wait_for_opened $cp dontfail
244 atf_check -s not-exit:0 -o ignore -e ignore \ 247 atf_check -s not-exit:0 -o ignore -e ignore \
245 rump.ping -c 1 -w $TIMEOUT $SERVER_IP 248 rump.ping -c 1 -w $TIMEOUT $SERVER_IP
246 atf_check -s exit:0 -o match:'DETACHED' rump.ifconfig pppoe0 249 atf_check -s exit:0 -o match:'DETACHED' rump.ifconfig pppoe0
247 unset RUMP_SERVER 250 unset RUMP_SERVER
248} 251}
249 252
250atf_test_case pppoe_pap cleanup 253atf_test_case pppoe_pap cleanup
251 254
252pppoe_pap_head() 255pppoe_pap_head()
253{ 256{
254 atf_set "descr" "Does simple pap tests" 257 atf_set "descr" "Does simple pap tests"
255 atf_set "require.progs" "rump_server pppoectl" 258 atf_set "require.progs" "rump_server pppoectl"
256} 259}
@@ -280,26 +283,27 @@ pppoe_chap_body() @@ -280,26 +283,27 @@ pppoe_chap_body()
280 run_test chap 283 run_test chap
281} 284}
282 285
283pppoe_chap_cleanup() 286pppoe_chap_cleanup()
284{ 287{
285 288
286 $DEBUG && dump 289 $DEBUG && dump
287 cleanup 290 cleanup
288} 291}
289 292
290run_test6() 293run_test6()
291{ 294{
292 local auth=$1 295 local auth=$1
 296 local cp="IPv6CP"
293 setup "inet=false" 297 setup "inet=false"
294 298
295 # As pppoe client doesn't support rechallenge yet. 299 # As pppoe client doesn't support rechallenge yet.
296 local server_optparam="" 300 local server_optparam=""
297 if [ $auth = "chap" ]; then 301 if [ $auth = "chap" ]; then
298 server_optparam="norechallenge" 302 server_optparam="norechallenge"
299 fi 303 fi
300 304
301 export RUMP_SERVER=$SERVER 305 export RUMP_SERVER=$SERVER
302 local setup_serverparam="pppoectl pppoe0 hisauthproto=$auth \ 306 local setup_serverparam="pppoectl pppoe0 hisauthproto=$auth \
303 'hisauthname=$AUTHNAME' \ 307 'hisauthname=$AUTHNAME' \
304 'hisauthsecret=$SECRET' \ 308 'hisauthsecret=$SECRET' \
305 'myauthproto=none' \ 309 'myauthproto=none' \
@@ -308,100 +312,100 @@ run_test6() @@ -308,100 +312,100 @@ run_test6()
308 atf_check -s exit:0 rump.ifconfig pppoe0 inet6 $SERVER_IP6/64 down 312 atf_check -s exit:0 rump.ifconfig pppoe0 inet6 $SERVER_IP6/64 down
309 atf_check -s exit:0 rump.ifconfig pppoe0 up 313 atf_check -s exit:0 rump.ifconfig pppoe0 up
310 unset RUMP_SERVER 314 unset RUMP_SERVER
311 315
312 export RUMP_SERVER=$CLIENT 316 export RUMP_SERVER=$CLIENT
313 local setup_clientparam="pppoectl pppoe0 myauthproto=$auth \ 317 local setup_clientparam="pppoectl pppoe0 myauthproto=$auth \
314 'myauthname=$AUTHNAME' \ 318 'myauthname=$AUTHNAME' \
315 'myauthsecret=$SECRET' \ 319 'myauthsecret=$SECRET' \
316 'hisauthproto=none'" 320 'hisauthproto=none'"
317 atf_check -s exit:0 -x "$HIJACKING $setup_clientparam" 321 atf_check -s exit:0 -x "$HIJACKING $setup_clientparam"
318 atf_check -s exit:0 rump.ifconfig pppoe0 inet6 $CLIENT_IP6/64 down 322 atf_check -s exit:0 rump.ifconfig pppoe0 inet6 $CLIENT_IP6/64 down
319 atf_check -s exit:0 rump.ifconfig pppoe0 up 323 atf_check -s exit:0 rump.ifconfig pppoe0 up
320 $DEBUG && rump.ifconfig 324 $DEBUG && rump.ifconfig
321 wait_for_session_established 325 wait_for_opened $cp
322 atf_check -s exit:0 -o ignore rump.ifconfig -w 10 326 atf_check -s exit:0 -o ignore rump.ifconfig -w 10
323 export RUMP_SERVER=$SERVER 327 export RUMP_SERVER=$SERVER
324 atf_check -s exit:0 -o ignore rump.ifconfig -w 10 328 atf_check -s exit:0 -o ignore rump.ifconfig -w 10
325 export RUMP_SERVER=$CLIENT 329 export RUMP_SERVER=$CLIENT
326 atf_check -s exit:0 -o ignore rump.ping6 -c 1 -X $TIMEOUT $SERVER_IP6 330 atf_check -s exit:0 -o ignore rump.ping6 -c 1 -X $TIMEOUT $SERVER_IP6
327 unset RUMP_SERVER 331 unset RUMP_SERVER
328 332
329 # test for disconnection from server 333 # test for disconnection from server
330 export RUMP_SERVER=$SERVER 334 export RUMP_SERVER=$SERVER
331 session_id=`$HIJACKING pppoectl -d pppoe0 | grep state` 335 session_id=`$HIJACKING pppoectl -d pppoe0 | grep state`
332 atf_check -s exit:0 rump.ifconfig pppoe0 down 336 atf_check -s exit:0 rump.ifconfig pppoe0 down
333 wait_for_disconnected 337 wait_for_disconnected
334 export RUMP_SERVER=$CLIENT 338 export RUMP_SERVER=$CLIENT
335 wait_for_disconnected 339 wait_for_disconnected
336 atf_check -s not-exit:0 -o ignore -e ignore \ 340 atf_check -s not-exit:0 -o ignore -e ignore \
337 rump.ping6 -c 1 -X $TIMEOUT $SERVER_IP6 341 rump.ping6 -c 1 -X $TIMEOUT $SERVER_IP6
338 atf_check -s exit:0 -o not-match:"$session_id" -x "$HIJACKING pppoectl -d pppoe0" 342 atf_check -s exit:0 -o not-match:"$session_id" -x "$HIJACKING pppoectl -d pppoe0"
339 unset RUMP_SERVER 343 unset RUMP_SERVER
340 344
341 # test for reconnecting 345 # test for reconnecting
342 export RUMP_SERVER=$SERVER 346 export RUMP_SERVER=$SERVER
343 atf_check -s exit:0 rump.ifconfig pppoe0 up 347 atf_check -s exit:0 rump.ifconfig pppoe0 up
344 wait_for_session_established 348 wait_for_opened $cp
345 atf_check -s exit:0 rump.ifconfig -w 10 349 atf_check -s exit:0 rump.ifconfig -w 10
346 $DEBUG && $HIJACKING pppoectl -d pppoe0 350 $DEBUG && $HIJACKING pppoectl -d pppoe0
347 $DEBUG && rump.ifconfig pppoe0 351 $DEBUG && rump.ifconfig pppoe0
348 export RUMP_SERVER=$CLIENT 352 export RUMP_SERVER=$CLIENT
349 atf_check -s exit:0 -o ignore rump.ifconfig -w 10 353 atf_check -s exit:0 -o ignore rump.ifconfig -w 10
350 atf_check -s exit:0 -o ignore rump.ping6 -c 1 -X $TIMEOUT $SERVER_IP6 354 atf_check -s exit:0 -o ignore rump.ping6 -c 1 -X $TIMEOUT $SERVER_IP6
351 unset RUMP_SERVER 355 unset RUMP_SERVER
352 356
353 # test for disconnection from client 357 # test for disconnection from client
354 export RUMP_SERVER=$CLIENT 358 export RUMP_SERVER=$CLIENT
355 atf_check -s exit:0 rump.ifconfig pppoe0 down 359 atf_check -s exit:0 rump.ifconfig pppoe0 down
356 wait_for_disconnected 360 wait_for_disconnected
357 361
358 export RUMP_SERVER=$SERVER 362 export RUMP_SERVER=$SERVER
359 wait_for_disconnected 363 wait_for_disconnected
360 $DEBUG && $HIJACKING pppoectl -d pppoe0 364 $DEBUG && $HIJACKING pppoectl -d pppoe0
361 atf_check -s not-exit:0 -o ignore -e ignore \ 365 atf_check -s not-exit:0 -o ignore -e ignore \
362 rump.ping6 -c 1 -X $TIMEOUT $CLIENT_IP6 366 rump.ping6 -c 1 -X $TIMEOUT $CLIENT_IP6
363 atf_check -s exit:0 -o match:'initial' -x "$HIJACKING pppoectl -d pppoe0" 367 atf_check -s exit:0 -o match:'initial' -x "$HIJACKING pppoectl -d pppoe0"
364 unset RUMP_SERVER 368 unset RUMP_SERVER
365 369
366 # test for reconnecting 370 # test for reconnecting
367 export RUMP_SERVER=$CLIENT 371 export RUMP_SERVER=$CLIENT
368 atf_check -s exit:0 rump.ifconfig pppoe0 up 372 atf_check -s exit:0 rump.ifconfig pppoe0 up
369 wait_for_session_established 373 wait_for_opened $cp
370 atf_check -s exit:0 rump.ifconfig -w 10 374 atf_check -s exit:0 rump.ifconfig -w 10
371 375
372 $DEBUG && rump.ifconfig pppoe0 376 $DEBUG && rump.ifconfig pppoe0
373 $DEBUG && $HIJACKING pppoectl -d pppoe0 377 $DEBUG && $HIJACKING pppoectl -d pppoe0
374 unset RUMP_SERVER 378 unset RUMP_SERVER
375 379
376 export RUMP_SERVER=$SERVER 380 export RUMP_SERVER=$SERVER
377 atf_check -s exit:0 rump.ifconfig -w 10 381 atf_check -s exit:0 rump.ifconfig -w 10
378 atf_check -s exit:0 -o ignore rump.ping6 -c 1 -X $TIMEOUT $CLIENT_IP6 382 atf_check -s exit:0 -o ignore rump.ping6 -c 1 -X $TIMEOUT $CLIENT_IP6
379 atf_check -s exit:0 -o match:'session' -x "$HIJACKING pppoectl -d pppoe0" 383 atf_check -s exit:0 -o match:'session' -x "$HIJACKING pppoectl -d pppoe0"
380 $DEBUG && HIJACKING pppoectl -d pppoe0 384 $DEBUG && HIJACKING pppoectl -d pppoe0
381 unset RUMP_SERVER 385 unset RUMP_SERVER
382 386
383 # test for invalid password 387 # test for invalid password
384 export RUMP_SERVER=$CLIENT 388 export RUMP_SERVER=$CLIENT
385 atf_check -s exit:0 rump.ifconfig pppoe0 down 389 atf_check -s exit:0 rump.ifconfig pppoe0 down
386 wait_for_disconnected 390 wait_for_disconnected
387 local setup_clientparam="pppoectl pppoe0 myauthproto=$auth \ 391 local setup_clientparam="pppoectl pppoe0 myauthproto=$auth \
388 'myauthname=$AUTHNAME' \ 392 'myauthname=$AUTHNAME' \
389 'myauthsecret=invalidsecret' \ 393 'myauthsecret=invalidsecret' \
390 'hisauthproto=none' \ 394 'hisauthproto=none' \
391 'max-auth-failure=1'" 395 'max-auth-failure=1'"
392 atf_check -s exit:0 -x "$HIJACKING $setup_clientparam" 396 atf_check -s exit:0 -x "$HIJACKING $setup_clientparam"
393 atf_check -s exit:0 rump.ifconfig pppoe0 up 397 atf_check -s exit:0 rump.ifconfig pppoe0 up
394 wait_for_session_established dontfail 398 wait_for_opened $cp dontfail
395 atf_check -s not-exit:0 -o ignore -e ignore \ 399 atf_check -s not-exit:0 -o ignore -e ignore \
396 rump.ping6 -c 1 -X $TIMEOUT $SERVER_IP6 400 rump.ping6 -c 1 -X $TIMEOUT $SERVER_IP6
397 atf_check -s exit:0 -o match:'DETACHED' rump.ifconfig pppoe0 401 atf_check -s exit:0 -o match:'DETACHED' rump.ifconfig pppoe0
398 unset RUMP_SERVER 402 unset RUMP_SERVER
399} 403}
400 404
401atf_test_case pppoe6_pap cleanup 405atf_test_case pppoe6_pap cleanup
402 406
403pppoe6_pap_head() 407pppoe6_pap_head()
404{ 408{
405 atf_set "descr" "Does simple pap using IPv6 tests" 409 atf_set "descr" "Does simple pap using IPv6 tests"
406 atf_set "require.progs" "rump_server pppoectl" 410 atf_set "require.progs" "rump_server pppoectl"
407} 411}
@@ -473,189 +477,190 @@ setup_auth_conf() @@ -473,189 +477,190 @@ setup_auth_conf()
473 $DEBUG && rump.ifconfig 477 $DEBUG && rump.ifconfig
474 unset RUMP_SERVER 478 unset RUMP_SERVER
475} 479}
476 480
477pppoe_params_head() 481pppoe_params_head()
478{ 482{
479 atf_set "descr" "Set and clear access concentrator name and service name" 483 atf_set "descr" "Set and clear access concentrator name and service name"
480 atf_set "require.progs" "rump_server pppoectl" 484 atf_set "require.progs" "rump_server pppoectl"
481} 485}
482 486
483pppoe_params_body() 487pppoe_params_body()
484{ 488{
485 local dumpcmd 489 local dumpcmd
 490 local cp="LCP"
486 491
487 dumpcmd="shmif_dumpbus -p - ${BUS}" 492 dumpcmd="shmif_dumpbus -p - ${BUS}"
488 dumpcmd="${dumpcmd} | tcpdump -n -e -r -" 493 dumpcmd="${dumpcmd} | tcpdump -n -e -r -"
489 494
490 rump_server_start $SERVER netinet6 pppoe 495 rump_server_start $SERVER netinet6 pppoe
491 rump_server_start $CLIENT netinet6 pppoe 496 rump_server_start $CLIENT netinet6 pppoe
492 497
493 setup_ifaces 498 setup_ifaces
494 setup_auth_conf 499 setup_auth_conf
495 500
496 export RUMP_SERVER=$SERVER 501 export RUMP_SERVER=$SERVER
497 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0" 502 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0"
498 atf_check -s exit:0 rump.ifconfig pppoe0 up 503 atf_check -s exit:0 rump.ifconfig pppoe0 up
499 unset RUMP_SERVER 504 unset RUMP_SERVER
500 505
501 export RUMP_SERVER=$CLIENT 506 export RUMP_SERVER=$CLIENT
502 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0" 507 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0"
503 atf_check -s exit:0 rump.ifconfig pppoe0 up 508 atf_check -s exit:0 rump.ifconfig pppoe0 up
504 $DEBUG && rump.ifconfig 509 $DEBUG && rump.ifconfig
505 wait_for_session_established 510 wait_for_opened $cp
506 unset RUMP_SERVER 511 unset RUMP_SERVER
507 512
508 $DEBUG && dump_bus 513 $DEBUG && dump_bus
509 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \ 514 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \
510 -x "${dumpcmd} | grep PADI" 515 -x "${dumpcmd} | grep PADI"
511 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \ 516 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \
512 -x "${dumpcmd} | grep PADR" 517 -x "${dumpcmd} | grep PADR"
513 atf_check -s exit:0 -o not-match:'AC-Name' -e ignore \ 518 atf_check -s exit:0 -o not-match:'AC-Name' -e ignore \
514 -x "${dumpcmd} | grep PADI" 519 -x "${dumpcmd} | grep PADI"
515 520
516 # set Remote access concentrator name (AC-NAME, -a option) 521 # set Remote access concentrator name (AC-NAME, -a option)
517 export RUMP_SERVER=$CLIENT 522 export RUMP_SERVER=$CLIENT
518 atf_check -s exit:0 rump.ifconfig pppoe0 down 523 atf_check -s exit:0 rump.ifconfig pppoe0 down
519 wait_for_disconnected 524 wait_for_disconnected
520 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 -a ACNAME-TEST0 pppoe0" 525 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 -a ACNAME-TEST0 pppoe0"
521 atf_check -s exit:0 rump.ifconfig pppoe0 up 526 atf_check -s exit:0 rump.ifconfig pppoe0 up
522 $DEBUG && rump.ifconfig 527 $DEBUG && rump.ifconfig
523 wait_for_session_established 528 wait_for_opened $cp
524 unset RUMP_SERVER 529 unset RUMP_SERVER
525 530
526 $DEBUG && dump_bus 531 $DEBUG && dump_bus
527 atf_check -s exit:0 -o match:'\[AC-Name "ACNAME-TEST0"\]' -e ignore \ 532 atf_check -s exit:0 -o match:'\[AC-Name "ACNAME-TEST0"\]' -e ignore \
528 -x "${dumpcmd} | grep PADI" 533 -x "${dumpcmd} | grep PADI"
529 534
530 # change AC-NAME 535 # change AC-NAME
531 export RUMP_SERVER=$CLIENT 536 export RUMP_SERVER=$CLIENT
532 atf_check -s exit:0 rump.ifconfig pppoe0 down 537 atf_check -s exit:0 rump.ifconfig pppoe0 down
533 wait_for_disconnected 538 wait_for_disconnected
534 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 -a ACNAME-TEST1 pppoe0" 539 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 -a ACNAME-TEST1 pppoe0"
535 atf_check -s exit:0 rump.ifconfig pppoe0 up 540 atf_check -s exit:0 rump.ifconfig pppoe0 up
536 $DEBUG && rump.ifconfig 541 $DEBUG && rump.ifconfig
537 wait_for_session_established 542 wait_for_opened $cp
538 unset RUMP_SERVER 543 unset RUMP_SERVER
539 544
540 $DEBUG && dump_bus 545 $DEBUG && dump_bus
541 atf_check -s exit:0 -o match:'\[AC-Name "ACNAME-TEST1"\]' -e ignore \ 546 atf_check -s exit:0 -o match:'\[AC-Name "ACNAME-TEST1"\]' -e ignore \
542 -x "${dumpcmd} | grep PADI" 547 -x "${dumpcmd} | grep PADI"
543 548
544 # clear AC-NAME 549 # clear AC-NAME
545 rump_server_destroy_ifaces 550 rump_server_destroy_ifaces
546 rm ${BUS} 2> /dev/null 551 rm ${BUS} 2> /dev/null
547 setup_ifaces 552 setup_ifaces
548 setup_auth_conf 553 setup_auth_conf
549 554
550 export RUMP_SERVER=$SERVER 555 export RUMP_SERVER=$SERVER
551 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0" 556 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0"
552 atf_check -s exit:0 rump.ifconfig pppoe0 up 557 atf_check -s exit:0 rump.ifconfig pppoe0 up
553 unset RUMP_SERVER 558 unset RUMP_SERVER
554 559
555 export RUMP_SERVER=$CLIENT 560 export RUMP_SERVER=$CLIENT
556 atf_check -s exit:0 rump.ifconfig pppoe0 down 561 atf_check -s exit:0 rump.ifconfig pppoe0 down
557 wait_for_disconnected 562 wait_for_disconnected
558 atf_check -s exit:0 -x "$HIJACKING pppoectl -a ACNAME-TEST2 -e shmif0 pppoe0" 563 atf_check -s exit:0 -x "$HIJACKING pppoectl -a ACNAME-TEST2 -e shmif0 pppoe0"
559 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0" 564 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0"
560 atf_check -s exit:0 rump.ifconfig pppoe0 up 565 atf_check -s exit:0 rump.ifconfig pppoe0 up
561 $DEBUG && rump.ifconfig 566 $DEBUG && rump.ifconfig
562 wait_for_session_established 567 wait_for_opened $cp
563 unset RUMP_SERVER 568 unset RUMP_SERVER
564 569
565 $DEBUG && dump_bus 570 $DEBUG && dump_bus
566 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \ 571 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \
567 -x "${dumpcmd} | grep PADI" 572 -x "${dumpcmd} | grep PADI"
568 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \ 573 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \
569 -x "${dumpcmd} | grep PADR" 574 -x "${dumpcmd} | grep PADR"
570 atf_check -s exit:0 -o not-match:'AC-Name' -e ignore \ 575 atf_check -s exit:0 -o not-match:'AC-Name' -e ignore \
571 -x "${dumpcmd} | grep PADI" 576 -x "${dumpcmd} | grep PADI"
572 577
573 # store 0 length string in AC-NAME 578 # store 0 length string in AC-NAME
574 export RUMP_SERVER=$CLIENT 579 export RUMP_SERVER=$CLIENT
575 atf_check -s exit:0 rump.ifconfig pppoe0 down 580 atf_check -s exit:0 rump.ifconfig pppoe0 down
576 wait_for_disconnected 581 wait_for_disconnected
577 atf_check -s exit:0 -x "$HIJACKING pppoectl -a \"\" -e shmif0 pppoe0" 582 atf_check -s exit:0 -x "$HIJACKING pppoectl -a \"\" -e shmif0 pppoe0"
578 atf_check -s exit:0 rump.ifconfig pppoe0 up 583 atf_check -s exit:0 rump.ifconfig pppoe0 up
579 $DEBUG && rump.ifconfig 584 $DEBUG && rump.ifconfig
580 wait_for_session_established 585 wait_for_opened $cp
581 unset RUMP_SERVER 586 unset RUMP_SERVER
582 587
583 atf_check -s exit:0 -o match:'\[AC-Name\]' -e ignore \ 588 atf_check -s exit:0 -o match:'\[AC-Name\]' -e ignore \
584 -x "${dumpcmd} | grep PADI" 589 -x "${dumpcmd} | grep PADI"
585 590
586 # set Service Name (Service-Name, -s option) 591 # set Service Name (Service-Name, -s option)
587 rump_server_destroy_ifaces 592 rump_server_destroy_ifaces
588 rm ${BUS} 2> /dev/null 593 rm ${BUS} 2> /dev/null
589 setup_ifaces 594 setup_ifaces
590 setup_auth_conf 595 setup_auth_conf
591 596
592 export RUMP_SERVER=$SERVER 597 export RUMP_SERVER=$SERVER
593 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0" 598 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0"
594 atf_check -s exit:0 rump.ifconfig pppoe0 up 599 atf_check -s exit:0 rump.ifconfig pppoe0 up
595 unset RUMP_SERVER 600 unset RUMP_SERVER
596 601
597 export RUMP_SERVER=$CLIENT 602 export RUMP_SERVER=$CLIENT
598 atf_check -s exit:0 rump.ifconfig pppoe0 down 603 atf_check -s exit:0 rump.ifconfig pppoe0 down
599 wait_for_disconnected 604 wait_for_disconnected
600 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 -s SNAME-TEST0 pppoe0" 605 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 -s SNAME-TEST0 pppoe0"
601 atf_check -s exit:0 rump.ifconfig pppoe0 up 606 atf_check -s exit:0 rump.ifconfig pppoe0 up
602 $DEBUG && rump.ifconfig 607 $DEBUG && rump.ifconfig
603 wait_for_session_established 608 wait_for_opened $cp
604 unset RUMP_SERVER 609 unset RUMP_SERVER
605 610
606 $DEBUG && dump_bus 611 $DEBUG && dump_bus
607 atf_check -s exit:0 -o match:'\[Service-Name "SNAME-TEST0"\]' -e ignore \ 612 atf_check -s exit:0 -o match:'\[Service-Name "SNAME-TEST0"\]' -e ignore \
608 -x "${dumpcmd} | grep PADI" 613 -x "${dumpcmd} | grep PADI"
609 atf_check -s exit:0 -o match:'\[Service-Name "SNAME-TEST0"\]' -e ignore \ 614 atf_check -s exit:0 -o match:'\[Service-Name "SNAME-TEST0"\]' -e ignore \
610 -x "${dumpcmd} | grep PADR" 615 -x "${dumpcmd} | grep PADR"
611 atf_check -s exit:0 -o not-match:'AC-Name' -e ignore \ 616 atf_check -s exit:0 -o not-match:'AC-Name' -e ignore \
612 -x "${dumpcmd} | grep PADI" 617 -x "${dumpcmd} | grep PADI"
613 618
614 # change Service-Name 619 # change Service-Name
615 export RUMP_SERVER=$CLIENT 620 export RUMP_SERVER=$CLIENT
616 atf_check -s exit:0 rump.ifconfig pppoe0 down 621 atf_check -s exit:0 rump.ifconfig pppoe0 down
617 wait_for_disconnected 622 wait_for_disconnected
618 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 -s SNAME-TEST1 pppoe0" 623 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 -s SNAME-TEST1 pppoe0"
619 atf_check -s exit:0 rump.ifconfig pppoe0 up 624 atf_check -s exit:0 rump.ifconfig pppoe0 up
620 $DEBUG && rump.ifconfig 625 $DEBUG && rump.ifconfig
621 wait_for_session_established 626 wait_for_opened $cp
622 unset RUMP_SERVER 627 unset RUMP_SERVER
623 628
624 $DEBUG && dump_bus 629 $DEBUG && dump_bus
625 atf_check -s exit:0 -o match:'\[Service-Name "SNAME-TEST1"\]' -e ignore \ 630 atf_check -s exit:0 -o match:'\[Service-Name "SNAME-TEST1"\]' -e ignore \
626 -x "${dumpcmd} | grep PADI" 631 -x "${dumpcmd} | grep PADI"
627 atf_check -s exit:0 -o match:'\[Service-Name "SNAME-TEST1"\]' -e ignore \ 632 atf_check -s exit:0 -o match:'\[Service-Name "SNAME-TEST1"\]' -e ignore \
628 -x "${dumpcmd} | grep PADR" 633 -x "${dumpcmd} | grep PADR"
629 634
630 # clear Service-Name 635 # clear Service-Name
631 rump_server_destroy_ifaces 636 rump_server_destroy_ifaces
632 rm ${BUS} 2> /dev/null 637 rm ${BUS} 2> /dev/null
633 setup_ifaces 638 setup_ifaces
634 setup_auth_conf 639 setup_auth_conf
635 640
636 export RUMP_SERVER=$SERVER 641 export RUMP_SERVER=$SERVER
637 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0" 642 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0"
638 atf_check -s exit:0 rump.ifconfig pppoe0 up 643 atf_check -s exit:0 rump.ifconfig pppoe0 up
639 unset RUMP_SERVER 644 unset RUMP_SERVER
640 645
641 export RUMP_SERVER=$CLIENT 646 export RUMP_SERVER=$CLIENT
642 atf_check -s exit:0 rump.ifconfig pppoe0 down 647 atf_check -s exit:0 rump.ifconfig pppoe0 down
643 wait_for_disconnected 648 wait_for_disconnected
644 atf_check -s exit:0 -x "$HIJACKING pppoectl -s SNAME-TEST2 -e shmif0 pppoe0" 649 atf_check -s exit:0 -x "$HIJACKING pppoectl -s SNAME-TEST2 -e shmif0 pppoe0"
645 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0" 650 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0"
646 atf_check -s exit:0 rump.ifconfig pppoe0 up 651 atf_check -s exit:0 rump.ifconfig pppoe0 up
647 $DEBUG && rump.ifconfig 652 $DEBUG && rump.ifconfig
648 wait_for_session_established 653 wait_for_opened $cp
649 unset RUMP_SERVER 654 unset RUMP_SERVER
650 655
651 $DEBUG && dump_bus 656 $DEBUG && dump_bus
652 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \ 657 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \
653 -x "${dumpcmd} | grep PADI" 658 -x "${dumpcmd} | grep PADI"
654 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \ 659 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \
655 -x "${dumpcmd} | grep PADR" 660 -x "${dumpcmd} | grep PADR"
656 atf_check -s exit:0 -o not-match:'AC-Name' -e ignore \ 661 atf_check -s exit:0 -o not-match:'AC-Name' -e ignore \
657 -x "${dumpcmd} | grep PADI" 662 -x "${dumpcmd} | grep PADI"
658 663
659 # set AC-NAME and Service-Name 664 # set AC-NAME and Service-Name
660 rump_server_destroy_ifaces 665 rump_server_destroy_ifaces
661 rm ${BUS} 2> /dev/null 666 rm ${BUS} 2> /dev/null
@@ -664,67 +669,67 @@ pppoe_params_body() @@ -664,67 +669,67 @@ pppoe_params_body()
664 669
665 export RUMP_SERVER=$SERVER 670 export RUMP_SERVER=$SERVER
666 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0" 671 atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0"
667 atf_check -s exit:0 rump.ifconfig pppoe0 up 672 atf_check -s exit:0 rump.ifconfig pppoe0 up
668 unset RUMP_SERVER 673 unset RUMP_SERVER
669 674
670 export RUMP_SERVER=$CLIENT 675 export RUMP_SERVER=$CLIENT
671 atf_check -s exit:0 rump.ifconfig pppoe0 down 676 atf_check -s exit:0 rump.ifconfig pppoe0 down
672 wait_for_disconnected 677 wait_for_disconnected
673 atf_check -s exit:0 -x \ 678 atf_check -s exit:0 -x \
674 "$HIJACKING pppoectl -e shmif0 -a ACNAME-TEST3 -s SNAME-TEST3 pppoe0" 679 "$HIJACKING pppoectl -e shmif0 -a ACNAME-TEST3 -s SNAME-TEST3 pppoe0"
675 atf_check -s exit:0 rump.ifconfig pppoe0 up 680 atf_check -s exit:0 rump.ifconfig pppoe0 up
676 $DEBUG && rump.ifconfig 681 $DEBUG && rump.ifconfig
677 wait_for_session_established 682 wait_for_opened $cp
678 unset RUMP_SERVER 683 unset RUMP_SERVER
679 684
680 $DEBUG && dump_bus 685 $DEBUG && dump_bus
681 atf_check -s exit:0 \ 686 atf_check -s exit:0 \
682 -o match:'\[Service-Name "SNAME-TEST3"\] \[AC-Name "ACNAME-TEST3"\]' \ 687 -o match:'\[Service-Name "SNAME-TEST3"\] \[AC-Name "ACNAME-TEST3"\]' \
683 -e ignore \ 688 -e ignore \
684 -x "${dumpcmd} | grep PADI" 689 -x "${dumpcmd} | grep PADI"
685 atf_check -s exit:0 -o match:'\[Service-Name "SNAME-TEST3"\]' -e ignore \ 690 atf_check -s exit:0 -o match:'\[Service-Name "SNAME-TEST3"\]' -e ignore \
686 -x "${dumpcmd} | grep PADR" 691 -x "${dumpcmd} | grep PADR"
687 692
688 # change AC-NAME 693 # change AC-NAME
689 export RUMP_SERVER=$CLIENT 694 export RUMP_SERVER=$CLIENT
690 atf_check -s exit:0 rump.ifconfig pppoe0 down 695 atf_check -s exit:0 rump.ifconfig pppoe0 down
691 wait_for_disconnected 696 wait_for_disconnected
692 atf_check -s exit:0 -x \ 697 atf_check -s exit:0 -x \
693 "$HIJACKING pppoectl -e shmif0 -a ACNAME-TEST4 pppoe0" 698 "$HIJACKING pppoectl -e shmif0 -a ACNAME-TEST4 pppoe0"
694 atf_check -s exit:0 rump.ifconfig pppoe0 up 699 atf_check -s exit:0 rump.ifconfig pppoe0 up
695 $DEBUG && rump.ifconfig 700 $DEBUG && rump.ifconfig
696 wait_for_session_established 701 wait_for_opened $cp
697 unset RUMP_SERVER 702 unset RUMP_SERVER
698 703
699 $DEBUG && dump_bus 704 $DEBUG && dump_bus
700 atf_check -s exit:0 \ 705 atf_check -s exit:0 \
701 -o match:'\[Service-Name\] \[AC-Name "ACNAME-TEST4"\]' \ 706 -o match:'\[Service-Name\] \[AC-Name "ACNAME-TEST4"\]' \
702 -e ignore \ 707 -e ignore \
703 -x "${dumpcmd} | grep PADI" 708 -x "${dumpcmd} | grep PADI"
704 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \ 709 atf_check -s exit:0 -o match:'\[Service-Name\]' -e ignore \
705 -x "${dumpcmd} | grep PADR" 710 -x "${dumpcmd} | grep PADR"
706 711
707 # change Service-Name 712 # change Service-Name
708 export RUMP_SERVER=$CLIENT 713 export RUMP_SERVER=$CLIENT
709 atf_check -s exit:0 rump.ifconfig pppoe0 down 714 atf_check -s exit:0 rump.ifconfig pppoe0 down
710 wait_for_disconnected 715 wait_for_disconnected
711 atf_check -s exit:0 -x \ 716 atf_check -s exit:0 -x \
712 "$HIJACKING pppoectl -e shmif0 -a ACNAME-TEST5 -s SNAME-TEST5 pppoe0" 717 "$HIJACKING pppoectl -e shmif0 -a ACNAME-TEST5 -s SNAME-TEST5 pppoe0"
713 atf_check -s exit:0 -x \ 718 atf_check -s exit:0 -x \
714 "$HIJACKING pppoectl -e shmif0 -s SNAME-TEST6 pppoe0" 719 "$HIJACKING pppoectl -e shmif0 -s SNAME-TEST6 pppoe0"
715 atf_check -s exit:0 rump.ifconfig pppoe0 up 720 atf_check -s exit:0 rump.ifconfig pppoe0 up
716 $DEBUG && rump.ifconfig 721 $DEBUG && rump.ifconfig
717 wait_for_session_established 722 wait_for_opened $cp
718 unset RUMP_SERVER 723 unset RUMP_SERVER
719 724
720 $DEBUG && dump_bus 725 $DEBUG && dump_bus
721 atf_check -s exit:0 \ 726 atf_check -s exit:0 \
722 -o match:'\[Service-Name "SNAME-TEST6"\]' \ 727 -o match:'\[Service-Name "SNAME-TEST6"\]' \
723 -e ignore \ 728 -e ignore \
724 -x "${dumpcmd} | grep PADI" 729 -x "${dumpcmd} | grep PADI"
725 atf_check -s exit:0 -o match:'\[Service-Name "SNAME-TEST6"\]' -e ignore \ 730 atf_check -s exit:0 -o match:'\[Service-Name "SNAME-TEST6"\]' -e ignore \
726 -x "${dumpcmd} | grep PADR" 731 -x "${dumpcmd} | grep PADR"
727 atf_check -s exit:0 -o not-match:'\[AC-Name "ACNAME-TEST5\]"' -e ignore \ 732 atf_check -s exit:0 -o not-match:'\[AC-Name "ACNAME-TEST5\]"' -e ignore \
728 -x "${dumpcmd} | grep PADI" 733 -x "${dumpcmd} | grep PADI"
729} 734}
730 735