diff options
Diffstat (limited to 'networking/libiproute/libnetlink.c')
-rw-r--r-- | networking/libiproute/libnetlink.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c index f08d862d0..40955fcae 100644 --- a/networking/libiproute/libnetlink.c +++ b/networking/libiproute/libnetlink.c | |||
@@ -15,16 +15,13 @@ | |||
15 | 15 | ||
16 | void FAST_FUNC xrtnl_open(struct rtnl_handle *rth/*, unsigned subscriptions*/) | 16 | void FAST_FUNC xrtnl_open(struct rtnl_handle *rth/*, unsigned subscriptions*/) |
17 | { | 17 | { |
18 | socklen_t addr_len; | ||
19 | |||
20 | memset(rth, 0, sizeof(*rth)); | 18 | memset(rth, 0, sizeof(*rth)); |
21 | rth->fd = xsocket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); | 19 | rth->fd = xsocket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); |
22 | rth->local.nl_family = AF_NETLINK; | 20 | rth->local.nl_family = AF_NETLINK; |
23 | /*rth->local.nl_groups = subscriptions;*/ | 21 | /*rth->local.nl_groups = subscriptions;*/ |
24 | 22 | ||
25 | xbind(rth->fd, (struct sockaddr*)&rth->local, sizeof(rth->local)); | 23 | xbind(rth->fd, (struct sockaddr*)&rth->local, sizeof(rth->local)); |
26 | addr_len = sizeof(rth->local); | 24 | bb_getsockname(rth->fd, (struct sockaddr*)&rth->local, sizeof(rth->local)); |
27 | getsockname(rth->fd, (struct sockaddr*)&rth->local, &addr_len); | ||
28 | 25 | ||
29 | /* too much paranoia | 26 | /* too much paranoia |
30 | if (getsockname(rth->fd, (struct sockaddr*)&rth->local, &addr_len) < 0) | 27 | if (getsockname(rth->fd, (struct sockaddr*)&rth->local, &addr_len) < 0) |