use /dev/urandom instead of /dev/random to avoid blocking
...since in some typical deployment scenarios, e.g. small, minimal VMs, not enough entropy may be available. Fixes #170.
This commit is contained in:
1 parent
0dd9abdd57
commit
57c17b6cef
1 file changed
+1
-1
@@ -109,7 +109,7 @@ delete_iptables_rule() {
|
|||||||
create_bridge() {
|
create_bridge() {
|
||||||
[ ! -d /sys/class/net/$BRIDGE ] && {
|
[ ! -d /sys/class/net/$BRIDGE ] && {
|
||||||
ip link add name $BRIDGE type bridge
|
ip link add name $BRIDGE type bridge
|
||||||
ip link set dev $BRIDGE address 7a:$(od -txC -An -N5 /dev/random | tr \ : | tail -c+2)
|
ip link set dev $BRIDGE address 7a:$(od -txC -An -N5 /dev/urandom | tr \ : | tail -c+2)
|
||||||
# Attempting to set the bridge MTU to a high value directly
|
# Attempting to set the bridge MTU to a high value directly
|
||||||
# fails. Bridges take the lowest MTU of their interfaces. So
|
# fails. Bridges take the lowest MTU of their interfaces. So
|
||||||
# instead we create a temporary interface with the desired
|
# instead we create a temporary interface with the desired
|
||||||
|
|||||||
Reference in new issue
Block a user