diff options
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/sd-rtnl/sd-rtnl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd/sd-rtnl/sd-rtnl.c b/src/libsystemd/sd-rtnl/sd-rtnl.c index 45ba50a856..ae49c77e01 100644 --- a/src/libsystemd/sd-rtnl/sd-rtnl.c +++ b/src/libsystemd/sd-rtnl/sd-rtnl.c @@ -146,7 +146,8 @@ static int rtnl_open_fd_ap(sd_rtnl **ret, int fd, unsigned n_groups, va_list ap) addrlen = sizeof(rtnl->sockaddr); r = bind(fd, &rtnl->sockaddr.sa, addrlen); - if (r < 0) + /* ignore EINVAL to allow opening an already bound socket */ + if (r < 0 && errno != EINVAL) return -errno; r = getsockname(fd, &rtnl->sockaddr.sa, &addrlen); |