Exa-Networks / exaproxy

Performant Content Modifying Non-Caching Proxy [stable - accepting patches for bug fixes only]
Other
145 stars 36 forks source link

getifaddrs fails in some linux environments - fix included #33

Closed asthomas closed 10 years ago

asthomas commented 10 years ago

I have a fairly complicated network interface set-up on my Linux machine, and not all of the network interfaces have IP addresses. The code in interfaces.py does not account for this possibility and therefore exaproxy fails to start. The fix is simple:

In function getifaddrs() in the file interfaces.py, there is a loop starting with

    while ifa:

After the while, add the following code:

        if ifa.ifa_addr == None:
            if ifa.ifa_next:
                ifa = ifaddrs.from_address(ifa.ifa_next)
                continue
            else:
                break
thomas-mangin commented 10 years ago

Thank you very much for this fix, we will apply shortly.

david-farrar commented 10 years ago

Hello,

Thank you very much for the fix: we've applied it in revision https://github.com/Exa-Networks/exaproxy/commit/57f55bf7b8fc106bd34364be319c0df0e13ce335