diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index b3cbe38..4bc87e7 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -39,13 +39,13 @@
 #define filter (*(filter_t*)&bb_common_bufsiz1)
 
 
-static void print_link_flags(FILE *fp, unsigned flags, unsigned mdown)
+static void print_link_flags(unsigned flags, unsigned mdown)
 {
-	fprintf(fp, "<");
+	printf("<");
 	flags &= ~IFF_RUNNING;
 #define _PF(f) if (flags & IFF_##f) { \
 		  flags &= ~IFF_##f; \
-		  fprintf(fp, #f "%s", flags ? "," : ""); }
+		  printf(#f "%s", flags ? "," : ""); }
 	_PF(LOOPBACK);
 	_PF(BROADCAST);
 	_PF(POINTOPOINT);
@@ -65,10 +65,10 @@
 	_PF(UP);
 #undef _PF
 	if (flags)
-		fprintf(fp, "%x", flags);
+		printf("%x", flags);
 	if (mdown)
-		fprintf(fp, ",M-DOWN");
-	fprintf(fp, "> ");
+		printf(",M-DOWN");
+	printf("> ");
 }
 
 static void print_queuelen(char *name)
@@ -92,10 +92,8 @@
 		printf("qlen %d", ifr.ifr_qlen);
 }
 
-static int print_linkinfo(struct sockaddr_nl ATTRIBUTE_UNUSED *who,
-		const struct nlmsghdr *n, void ATTRIBUTE_UNUSED *arg)
+static int print_linkinfo(const struct nlmsghdr *n)
 {
-	FILE *fp = (FILE*)arg;
 	struct ifinfomsg *ifi = NLMSG_DATA(n);
 	struct rtattr * tb[IFLA_MAX+1];
 	int len = n->nlmsg_len;
@@ -127,34 +125,34 @@
 	}
 
 	if (n->nlmsg_type == RTM_DELLINK)
-		fprintf(fp, "Deleted ");
+		printf("Deleted ");
 
-	fprintf(fp, "%d: %s", ifi->ifi_index,
+	printf("%d: %s", ifi->ifi_index,
 		tb[IFLA_IFNAME] ? (char*)RTA_DATA(tb[IFLA_IFNAME]) : "<nil>");
 
 	if (tb[IFLA_LINK]) {
 		SPRINT_BUF(b1);
 		int iflink = *(int*)RTA_DATA(tb[IFLA_LINK]);
 		if (iflink == 0)
-			fprintf(fp, "@NONE: ");
+			printf("@NONE: ");
 		else {
-			fprintf(fp, "@%s: ", ll_idx_n2a(iflink, b1));
+			printf("@%s: ", ll_idx_n2a(iflink, b1));
 			m_flag = ll_index_to_flags(iflink);
 			m_flag = !(m_flag & IFF_UP);
 		}
 	} else {
-		fprintf(fp, ": ");
+		printf(": ");
 	}
-	print_link_flags(fp, ifi->ifi_flags, m_flag);
+	print_link_flags(ifi->ifi_flags, m_flag);
 
 	if (tb[IFLA_MTU])
-		fprintf(fp, "mtu %u ", *(int*)RTA_DATA(tb[IFLA_MTU]));
+		printf("mtu %u ", *(int*)RTA_DATA(tb[IFLA_MTU]));
 	if (tb[IFLA_QDISC])
-		fprintf(fp, "qdisc %s ", (char*)RTA_DATA(tb[IFLA_QDISC]));
+		printf("qdisc %s ", (char*)RTA_DATA(tb[IFLA_QDISC]));
 #ifdef IFLA_MASTER
 	if (tb[IFLA_MASTER]) {
 		SPRINT_BUF(b1);
-		fprintf(fp, "master %s ", ll_idx_n2a(*(int*)RTA_DATA(tb[IFLA_MASTER]), b1));
+		printf("master %s ", ll_idx_n2a(*(int*)RTA_DATA(tb[IFLA_MASTER]), b1));
 	}
 #endif
 	if (filter.showqueue)
@@ -162,27 +160,27 @@
 
 	if (!filter.family || filter.family == AF_PACKET) {
 		SPRINT_BUF(b1);
-		fprintf(fp, "%c    link/%s ", _SL_, ll_type_n2a(ifi->ifi_type, b1, sizeof(b1)));
+		printf("%c    link/%s ", _SL_, ll_type_n2a(ifi->ifi_type, b1, sizeof(b1)));
 
 		if (tb[IFLA_ADDRESS]) {
 			fputs(ll_addr_n2a(RTA_DATA(tb[IFLA_ADDRESS]),
 						      RTA_PAYLOAD(tb[IFLA_ADDRESS]),
 						      ifi->ifi_type,
-						      b1, sizeof(b1)), fp);
+						      b1, sizeof(b1)), stdout);
 		}
 		if (tb[IFLA_BROADCAST]) {
 			if (ifi->ifi_flags & IFF_POINTOPOINT)
-				fprintf(fp, " peer ");
+				printf(" peer ");
 			else
-				fprintf(fp, " brd ");
+				printf(" brd ");
 			fputs(ll_addr_n2a(RTA_DATA(tb[IFLA_BROADCAST]),
 						      RTA_PAYLOAD(tb[IFLA_BROADCAST]),
 						      ifi->ifi_type,
-						      b1, sizeof(b1)), fp);
+						      b1, sizeof(b1)), stdout);
 		}
 	}
-	fputc('\n', fp);
-	fflush(fp);
+	bb_putchar('\n');
+	/*fflush(stdout);*/
 	return 0;
 }
 
@@ -196,10 +194,9 @@
 	return 0;
 }
 
-static int print_addrinfo(struct sockaddr_nl ATTRIBUTE_UNUSED *who,
-		struct nlmsghdr *n, void ATTRIBUTE_UNUSED *arg)
+static int print_addrinfo(struct sockaddr_nl *who ATTRIBUTE_UNUSED,
+		struct nlmsghdr *n, void *arg ATTRIBUTE_UNUSED)
 {
-	FILE *fp = (FILE*)arg;
 	struct ifaddrmsg *ifa = NLMSG_DATA(n);
 	int len = n->nlmsg_len;
 	struct rtattr * rta_tb[IFA_MAX+1];
@@ -268,28 +265,28 @@
 	}
 
 	if (n->nlmsg_type == RTM_DELADDR)
-		fprintf(fp, "Deleted ");
+		printf("Deleted ");
 
 	if (filter.oneline)
-		fprintf(fp, "%u: %s", ifa->ifa_index, ll_index_to_name(ifa->ifa_index));
+		printf("%u: %s", ifa->ifa_index, ll_index_to_name(ifa->ifa_index));
 	if (ifa->ifa_family == AF_INET)
-		fprintf(fp, "    inet ");
+		printf("    inet ");
 	else if (ifa->ifa_family == AF_INET6)
-		fprintf(fp, "    inet6 ");
+		printf("    inet6 ");
 	else
-		fprintf(fp, "    family %d ", ifa->ifa_family);
+		printf("    family %d ", ifa->ifa_family);
 
 	if (rta_tb[IFA_LOCAL]) {
 		fputs(rt_addr_n2a(ifa->ifa_family,
 					      RTA_PAYLOAD(rta_tb[IFA_LOCAL]),
 					      RTA_DATA(rta_tb[IFA_LOCAL]),
-					      abuf, sizeof(abuf)), fp);
+					      abuf, sizeof(abuf)), stdout);
 
 		if (rta_tb[IFA_ADDRESS] == NULL ||
 		    memcmp(RTA_DATA(rta_tb[IFA_ADDRESS]), RTA_DATA(rta_tb[IFA_LOCAL]), 4) == 0) {
-			fprintf(fp, "/%d ", ifa->ifa_prefixlen);
+			printf("/%d ", ifa->ifa_prefixlen);
 		} else {
-			fprintf(fp, " peer %s/%d ",
+			printf(" peer %s/%d ",
 				rt_addr_n2a(ifa->ifa_family,
 					    RTA_PAYLOAD(rta_tb[IFA_ADDRESS]),
 					    RTA_DATA(rta_tb[IFA_ADDRESS]),
@@ -299,44 +296,44 @@
 	}
 
 	if (rta_tb[IFA_BROADCAST]) {
-		fprintf(fp, "brd %s ",
+		printf("brd %s ",
 			rt_addr_n2a(ifa->ifa_family,
 				    RTA_PAYLOAD(rta_tb[IFA_BROADCAST]),
 				    RTA_DATA(rta_tb[IFA_BROADCAST]),
 				    abuf, sizeof(abuf)));
 	}
 	if (rta_tb[IFA_ANYCAST]) {
-		fprintf(fp, "any %s ",
+		printf("any %s ",
 			rt_addr_n2a(ifa->ifa_family,
 				    RTA_PAYLOAD(rta_tb[IFA_ANYCAST]),
 				    RTA_DATA(rta_tb[IFA_ANYCAST]),
 				    abuf, sizeof(abuf)));
 	}
-	fprintf(fp, "scope %s ", rtnl_rtscope_n2a(ifa->ifa_scope, b1, sizeof(b1)));
+	printf("scope %s ", rtnl_rtscope_n2a(ifa->ifa_scope, b1, sizeof(b1)));
 	if (ifa->ifa_flags & IFA_F_SECONDARY) {
 		ifa->ifa_flags &= ~IFA_F_SECONDARY;
-		fprintf(fp, "secondary ");
+		printf("secondary ");
 	}
 	if (ifa->ifa_flags & IFA_F_TENTATIVE) {
 		ifa->ifa_flags &= ~IFA_F_TENTATIVE;
-		fprintf(fp, "tentative ");
+		printf("tentative ");
 	}
 	if (ifa->ifa_flags & IFA_F_DEPRECATED) {
 		ifa->ifa_flags &= ~IFA_F_DEPRECATED;
-		fprintf(fp, "deprecated ");
+		printf("deprecated ");
 	}
 	if (!(ifa->ifa_flags & IFA_F_PERMANENT)) {
-		fprintf(fp, "dynamic ");
+		printf("dynamic ");
 	} else
 		ifa->ifa_flags &= ~IFA_F_PERMANENT;
 	if (ifa->ifa_flags)
-		fprintf(fp, "flags %02x ", ifa->ifa_flags);
+		printf("flags %02x ", ifa->ifa_flags);
 	if (rta_tb[IFA_LABEL])
-		fputs((char*)RTA_DATA(rta_tb[IFA_LABEL]), fp);
+		fputs((char*)RTA_DATA(rta_tb[IFA_LABEL]), stdout);
 	if (rta_tb[IFA_CACHEINFO]) {
 		struct ifa_cacheinfo *ci = RTA_DATA(rta_tb[IFA_CACHEINFO]);
 		char buf[128];
-		fputc(_SL_, fp);
+		bb_putchar(_SL_);
 		if (ci->ifa_valid == 0xFFFFFFFFU)
 			sprintf(buf, "valid_lft forever");
 		else
@@ -345,10 +342,10 @@
 			sprintf(buf+strlen(buf), " preferred_lft forever");
 		else
 			sprintf(buf+strlen(buf), " preferred_lft %dsec", ci->ifa_prefered);
-		fprintf(fp, "       %s", buf);
+		printf("       %s", buf);
 	}
-	fputc('\n', fp);
-	fflush(fp);
+	bb_putchar('\n');
+	/*fflush(stdout);*/
 	return 0;
 }
 
@@ -359,7 +356,7 @@
 	struct nlmsghdr	  h;
 };
 
-static int print_selected_addrinfo(int ifindex, struct nlmsg_list *ainfo, FILE *fp)
+static int print_selected_addrinfo(int ifindex, struct nlmsg_list *ainfo)
 {
 	for (; ainfo; ainfo = ainfo->next) {
 		struct nlmsghdr *n = &ainfo->h;
@@ -375,7 +372,7 @@
 		    (filter.family && filter.family != ifa->ifa_family))
 			continue;
 
-		print_addrinfo(NULL, n, fp);
+		print_addrinfo(NULL, n, NULL);
 	}
 	return 0;
 }
@@ -498,7 +495,7 @@
 		for (;;) {
 			xrtnl_wilddump_request(&rth, filter.family, RTM_GETADDR);
 			filter.flushed = 0;
-			xrtnl_dump_filter(&rth, print_addrinfo, stdout);
+			xrtnl_dump_filter(&rth, print_addrinfo, NULL);
 			if (filter.flushed == 0) {
 				return 0;
 			}
@@ -574,10 +571,10 @@
 	}
 
 	for (l = linfo; l; l = l->next) {
-		if (no_link || print_linkinfo(NULL, &l->h, stdout) == 0) {
+		if (no_link || print_linkinfo(&l->h) == 0) {
 			struct ifinfomsg *ifi = NLMSG_DATA(&l->h);
 			if (filter.family != AF_PACKET)
-				print_selected_addrinfo(ifi->ifi_index, ainfo, stdout);
+				print_selected_addrinfo(ifi->ifi_index, ainfo);
 		}
 	}
 
diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c
index 3f9007e..f62429a 100644
--- a/networking/libiproute/iprule.c
+++ b/networking/libiproute/iprule.c
@@ -41,9 +41,8 @@
 */
 
 static int print_rule(struct sockaddr_nl *who ATTRIBUTE_UNUSED,
-					struct nlmsghdr *n, void *arg)
+					struct nlmsghdr *n, void *arg ATTRIBUTE_UNUSED)
 {
-	FILE *fp = (FILE*)arg;
 	struct rtmsg *r = NLMSG_DATA(n);
 	int len = n->nlmsg_len;
 	int host_len = -1;
@@ -71,14 +70,14 @@
 		host_len = 80;
 */
 	if (tb[RTA_PRIORITY])
-		fprintf(fp, "%u:\t", *(unsigned*)RTA_DATA(tb[RTA_PRIORITY]));
+		printf("%u:\t", *(unsigned*)RTA_DATA(tb[RTA_PRIORITY]));
 	else
-		fprintf(fp, "0:\t");
+		printf("0:\t");
 
-	fprintf(fp, "from ");
+	printf("from ");
 	if (tb[RTA_SRC]) {
 		if (r->rtm_src_len != host_len) {
-			fprintf(fp, "%s/%u", rt_addr_n2a(r->rtm_family,
+			printf("%s/%u", rt_addr_n2a(r->rtm_family,
 							 RTA_PAYLOAD(tb[RTA_SRC]),
 							 RTA_DATA(tb[RTA_SRC]),
 							 abuf, sizeof(abuf)),
@@ -88,73 +87,73 @@
 			fputs(format_host(r->rtm_family,
 						       RTA_PAYLOAD(tb[RTA_SRC]),
 						       RTA_DATA(tb[RTA_SRC]),
-						       abuf, sizeof(abuf)), fp);
+						       abuf, sizeof(abuf)), stdout);
 		}
 	} else if (r->rtm_src_len) {
-		fprintf(fp, "0/%d", r->rtm_src_len);
+		printf("0/%d", r->rtm_src_len);
 	} else {
-		fprintf(fp, "all");
+		printf("all");
 	}
-	fprintf(fp, " ");
+	bb_putchar(' ');
 
 	if (tb[RTA_DST]) {
 		if (r->rtm_dst_len != host_len) {
-			fprintf(fp, "to %s/%u ", rt_addr_n2a(r->rtm_family,
+			printf("to %s/%u ", rt_addr_n2a(r->rtm_family,
 							 RTA_PAYLOAD(tb[RTA_DST]),
 							 RTA_DATA(tb[RTA_DST]),
 							 abuf, sizeof(abuf)),
 				r->rtm_dst_len
 				);
 		} else {
-			fprintf(fp, "to %s ", format_host(r->rtm_family,
+			printf("to %s ", format_host(r->rtm_family,
 						       RTA_PAYLOAD(tb[RTA_DST]),
 						       RTA_DATA(tb[RTA_DST]),
 						       abuf, sizeof(abuf)));
 		}
 	} else if (r->rtm_dst_len) {
-		fprintf(fp, "to 0/%d ", r->rtm_dst_len);
+		printf("to 0/%d ", r->rtm_dst_len);
 	}
 
 	if (r->rtm_tos) {
-		fprintf(fp, "tos %s ", rtnl_dsfield_n2a(r->rtm_tos, b1, sizeof(b1)));
+		printf("tos %s ", rtnl_dsfield_n2a(r->rtm_tos, b1, sizeof(b1)));
 	}
 	if (tb[RTA_PROTOINFO]) {
-		fprintf(fp, "fwmark %#x ", *(uint32_t*)RTA_DATA(tb[RTA_PROTOINFO]));
+		printf("fwmark %#x ", *(uint32_t*)RTA_DATA(tb[RTA_PROTOINFO]));
 	}
 
 	if (tb[RTA_IIF]) {
-		fprintf(fp, "iif %s ", (char*)RTA_DATA(tb[RTA_IIF]));
+		printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF]));
 	}
 
 	if (r->rtm_table)
-		fprintf(fp, "lookup %s ", rtnl_rttable_n2a(r->rtm_table, b1, sizeof(b1)));
+		printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table, b1, sizeof(b1)));
 
 	if (tb[RTA_FLOW]) {
 		uint32_t to = *(uint32_t*)RTA_DATA(tb[RTA_FLOW]);
 		uint32_t from = to>>16;
 		to &= 0xFFFF;
 		if (from) {
-			fprintf(fp, "realms %s/",
+			printf("realms %s/",
 				rtnl_rtrealm_n2a(from, b1, sizeof(b1)));
 		}
-		fprintf(fp, "%s ",
+		printf("%s ",
 			rtnl_rtrealm_n2a(to, b1, sizeof(b1)));
 	}
 
 	if (r->rtm_type == RTN_NAT) {
 		if (tb[RTA_GATEWAY]) {
-			fprintf(fp, "map-to %s ",
+			printf("map-to %s ",
 				format_host(r->rtm_family,
 					    RTA_PAYLOAD(tb[RTA_GATEWAY]),
 					    RTA_DATA(tb[RTA_GATEWAY]),
 					    abuf, sizeof(abuf)));
 		} else
-			fprintf(fp, "masquerade");
+			printf("masquerade");
 	} else if (r->rtm_type != RTN_UNICAST)
-		fputs(rtnl_rtntype_n2a(r->rtm_type, b1, sizeof(b1)), fp);
+		fputs(rtnl_rtntype_n2a(r->rtm_type, b1, sizeof(b1)), stdout);
 
-	fputc('\n', fp);
-	fflush(fp);
+	bb_putchar('\n');
+	/*fflush(stdout);*/
 	return 0;
 }
 
@@ -176,7 +175,7 @@
 	xrtnl_open(&rth);
 
 	xrtnl_wilddump_request(&rth, af, RTM_GETRULE);
-	xrtnl_dump_filter(&rth, print_rule, stdout);
+	xrtnl_dump_filter(&rth, print_rule, NULL);
 
 	return 0;
 }
