FreeBSD Bugzilla – Attachment 230203 Details for
Bug 260499
[carp] Carp unable recover after demotion by send error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
testcase.sh
file_260499.txt (text/plain), 1.31 KB, created by
Marius Halden
on 2021-12-17 18:47:31 UTC
(
hide
)
Description:
testcase.sh
Filename:
MIME Type:
Creator:
Marius Halden
Created:
2021-12-17 18:47:31 UTC
Size:
1.31 KB
patch
obsolete
>#!/bin/sh > >set -eu > >create_jail() { > local jname=$1 > local if=$2 > local addr1="$3" > local addr2="$4" > > local ifcfg="ifconfig $if inet ${addr1} ; ifconfig $if ${addr2} alias vhid 1;" > local cmd="ifconfig lo0 up ; $ifcfg" > > printf "Staring jail %s" "${jname}" > jail -c name=${jname} path=/ host.hostname=${jname} vnet vnet.interface=${if} persist exec.start="/bin/sh -c '${cmd}'" > echo "." >} > >cleanup() { > printf "Cleaning up" > > jail -R test1 || : > ifconfig $e1a destroy || : > > echo "." >} > >wait() { > local time=$1 > shift > local msg="$@" > > printf "%s" "$msg" > > while [ $time -gt 0 ] ; do > printf "." > > time=$((time - 1)) > sleep 1 > done > > echo >} > >trap cleanup EXIT INT TERM > >e1a=$(ifconfig epair create) >e1b=${e1a%%a}b > >create_jail test1 $e1b 10.10.10.10/24 10.10.10.1/24 > >wait 3 > >dmesg | grep 'carp:' | tail -n 1 >jexec test1 /bin/sh -c 'sysctl net.inet.carp.demotion' > >echo >echo "Enabling pf" >jexec test1 /bin/sh -c "printf 'pass\nblock return from any to 224.0.0.18/32\n' | pfctl -f - ; pfctl -e" > >wait 3 > >dmesg | grep 'carp:' | tail -n 1 >jexec test1 /bin/sh -c 'sysctl net.inet.carp.demotion' > >echo >echo "Disabling pf" >jexec test1 /bin/sh -c "pfctl -d" > >wait 7 > >dmesg | grep 'carp:' | tail -n 1 >jexec test1 /bin/sh -c 'sysctl net.inet.carp.demotion'
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 260499
: 230203 |
230207