Feature #6394 » upf-add-tunnels2.sh
1 |
#!/bin/bash
|
---|---|
2 |
|
3 |
rm -f /tmp/batch.nft |
4 |
create_loop() { |
5 |
for ((i=0;i<10000;i++)) |
6 |
do
|
7 |
nft "add chain inet osmo-upf tunmap-pre-$i; |
8 |
add rule inet osmo-upf tunmap-pre-$i ip daddr set 3.3.3.3 meta mark set $i counter accept; |
9 |
add chain inet osmo-upf tunmap-post-$i; |
10 |
add rule inet osmo-upf tunmap-post-$i ip saddr set 2.2.2.3 @th,32,32 set 0x302 counter accept; |
11 |
add element inet osmo-upf tunmap-pre { 2.2.2.3 . 0x$i : jump tunmap-pre-$i }; |
12 |
add element inet osmo-upf tunmap-post { $i : jump tunmap-post-$i };" |
13 |
done
|
14 |
}
|
15 |
time create_loop
|
- « Previous
- 1
- 2
- 3
- Next »