session: Do not set up SNAT rules without ip address

If a dhcp lease is lost (expires and dhcp server does not respond)
ipconfig object for an interface still exists, but addr is null.

When that happens, add_nat_rules() passes a null pointer to iptables
which asserts and exits the ConnMan process.

Prevent that, by not enabling snat if there is no ip address.
1 file changed