newsnowlabs / docker-ingress-routing-daemon

Docker swarm daemon that modifies ingress mesh routing to expose true client IPs to service containers
MIT License
161 stars 31 forks source link

fix: -n getting bypassed #12

Closed coolcodemy closed 2 years ago

coolcodemy commented 2 years ago

somehow -n getting bypass. so i need to put ! -z for it to work

struanb commented 2 years ago

@coolcodemy Thanks ever so much for spotting this issue and sending a pull request. The issue is in fact the missing spaces between -n and the "$INGRESS_SUBNET" and "$INGRESS_DEFAULT_GATEWAY".

Adding the spaces in allows bash to interpret the code as intended, and then there is no need for the ! -z in your patch.

I've pushed v3.2.0 to fix this issue, and published a new release. Upgrading highly recommended!