aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
Diffstat (limited to 'networking')
-rw-r--r--networking/ifplugd.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/networking/ifplugd.c b/networking/ifplugd.c
index 1426709cb..b7b26c113 100644
--- a/networking/ifplugd.c
+++ b/networking/ifplugd.c
@@ -604,15 +604,7 @@ int ifplugd_main(int argc UNUSED_PARAM, char **argv)
604 604
605 xmove_fd(xsocket(AF_INET, SOCK_DGRAM, 0), ioctl_fd); 605 xmove_fd(xsocket(AF_INET, SOCK_DGRAM, 0), ioctl_fd);
606 if (opts & FLAG_MONITOR) { 606 if (opts & FLAG_MONITOR) {
607 struct sockaddr_nl addr; 607 int fd = create_and_bind_to_netlink(NETLINK_ROUTE, RTMGRP_LINK, 0);
608 int fd = xsocket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);
609
610 memset(&addr, 0, sizeof(addr));
611 addr.nl_family = AF_NETLINK;
612 addr.nl_groups = RTMGRP_LINK;
613 addr.nl_pid = getpid();
614
615 xbind(fd, (struct sockaddr*)&addr, sizeof(addr));
616 xmove_fd(fd, netlink_fd); 608 xmove_fd(fd, netlink_fd);
617 } 609 }
618 610