[PATCH] ifplugd: fix netlink recv

Johannes Stezenbach js at sig21.net
Mon Jul 8 11:28:29 UTC 2013


ifplugd exits with error on newer kernels:

[ 1264.692730] libphy: eth0 - Link is Down
ifplugd(eth0): netlink packet too small or truncated
ifplugd(eth0): exiting

I found a fix for a similar issue here, it increases
buffer size from 2048 to 4096:
https://bugs.launchpad.net/ubuntu/+source/ifmetric/+bug/896584


--- busybox-1.21.0/networking/ifplugd.c.orig	2012-12-22 23:39:01.000000000 +0100
+++ busybox-1.21.0/networking/ifplugd.c	2013-07-08 13:12:54.372062361 +0200
@@ -451,7 +451,7 @@ static smallint detect_link(void)
 static NOINLINE int check_existence_through_netlink(void)
 {
 	int iface_len;
-	char replybuf[1024];
+	char replybuf[4096];
 
 	iface_len = strlen(G.iface);
 	while (1) {


More information about the busybox mailing list