fix IP address check
parent
2d15685b7d
commit
e080c47ea4
|
@ -182,7 +182,7 @@ debug "NODE_IP=$NODE_IP"
|
||||||
log "Configuring $NODE_IP/$POD_PREFIX on $BRIDGE"
|
log "Configuring $NODE_IP/$POD_PREFIX on $BRIDGE"
|
||||||
ip -o addr show "$BRIDGE" | grep -o 'inet [^ ]\+' | while read _ IP; do
|
ip -o addr show "$BRIDGE" | grep -o 'inet [^ ]\+' | while read _ IP; do
|
||||||
# Remove bridge addresses from the same subnet, don't touch other addresses
|
# Remove bridge addresses from the same subnet, don't touch other addresses
|
||||||
if [ $(ipcalc -b "$IP") = "$POD_BROADCAST" ] && [ "$IP" != "$NODE_IP/$POD_PREFIX" ]; then
|
if [ "$(ipcalc -b "$IP")" = "BROADCAST=${POD_BROADCAST}" ] && [ "$IP" != "$NODE_IP/$POD_PREFIX" ]; then
|
||||||
ip addr del "$IP" dev "$BRIDGE"
|
ip addr del "$IP" dev "$BRIDGE"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -65,7 +65,7 @@ spec:
|
||||||
hostPID: true
|
hostPID: true
|
||||||
containers:
|
containers:
|
||||||
- name: bridget
|
- name: bridget
|
||||||
image: docker.io/kvaps/bridget:v1.1.0
|
image: docker.io/kvaps/bridget:v1.1.1
|
||||||
env:
|
env:
|
||||||
- name: BRIDGE
|
- name: BRIDGE
|
||||||
value: "cbr0"
|
value: "cbr0"
|
||||||
|
|
Loading…
Reference in New Issue