Commit 1d82935d authored by Julien Muchembled's avatar Julien Muchembled

Ignore ENOMEM when checking routing cache

parent f2363823
...@@ -499,7 +499,15 @@ class BaseTunnelManager(object): ...@@ -499,7 +499,15 @@ class BaseTunnelManager(object):
# increases the probability of invalid entries in the cache: # increases the probability of invalid entries in the cache:
# https://lists.alioth.debian.org/pipermail/babel-users/2016-June/002547.html # https://lists.alioth.debian.org/pipermail/babel-users/2016-June/002547.html
with open('/proc/net/ipv6_route', "r", 4096) as f: with open('/proc/net/ipv6_route', "r", 4096) as f:
routing_table = f.read() try:
routing_table = f.read()
except IOError, e:
# ???: If someone can explain why the kernel sometimes fails
# even when there's a lot of free memory.
if e.errno != errno.ENOMEM:
raise
logging.error("Ignoring ENOMEM when checking routing cache")
return
cache = [] cache = []
other = [] other = []
n = self._network n = self._network
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment