From 081eb71ebd7954a67287816a9a6fff80e8c5319a Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 17 Mar 2008 09:02:21 +0000 Subject: dnsd: properly set _src_ IP:port on outgoing UDP packets function old new delta send_to_from - 258 +258 dnsd_main 1500 1568 +68 interrupt 17 19 +2 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/0 up/down: 328/0) Total: 328 bytes text data bss dec hex filename 797101 658 7428 805187 c4943 busybox_old 797429 658 7428 805515 c4a8b busybox_unstripped --- libbb/udp_io.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libbb/udp_io.c') diff --git a/libbb/udp_io.c b/libbb/udp_io.c index 2f02a138b..e968ecb66 100644 --- a/libbb/udp_io.c +++ b/libbb/udp_io.c @@ -25,10 +25,10 @@ socket_want_pktinfo(int fd) } -#ifdef UNUSED ssize_t send_to_from(int fd, void *buf, size_t len, int flags, - const struct sockaddr *from, const struct sockaddr *to, + const struct sockaddr *to, + const struct sockaddr *from, socklen_t tolen) { #ifndef IP_PKTINFO @@ -92,7 +92,6 @@ send_to_from(int fd, void *buf, size_t len, int flags, return sendmsg(fd, &msg, flags); #endif } -#endif /* UNUSED */ /* NB: this will never set port# in 'to'! * _Only_ IP/IPv6 address part of 'to' is _maybe_ modified. -- cgit v1.2.3