fix IP address check

master
Andrei Kvapil 2020-10-16 09:51:11 +02:00
parent 2d15685b7d
commit e080c47ea4
2 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ debug "NODE_IP=$NODE_IP"
log "Configuring $NODE_IP/$POD_PREFIX on $BRIDGE"
ip -o addr show "$BRIDGE" | grep -o 'inet [^ ]\+' | while read _ IP; do
# 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"
fi
done

View File

@ -65,7 +65,7 @@ spec:
hostPID: true
containers:
- name: bridget
image: docker.io/kvaps/bridget:v1.1.0
image: docker.io/kvaps/bridget:v1.1.1
env:
- name: BRIDGE
value: "cbr0"