udhcpc: dont use BPF filter, users report problems (bugs 4598, 6746), commit e4785ca653d0e219926692c229673b2c1b8d6ac4

Vladislav Grishenko themiron at mail.ru
Wed Feb 19 22:27:31 UTC 2014


Hi Denys,
Thanks, but filter code is still disabled

diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -990,7 +990,6 @@ static int udhcp_raw_socket(int ifindex)
 	sock.sll_ifindex = ifindex;
 	xbind(fd, (struct sockaddr *) &sock, sizeof(sock));
 
-#if 0 /* Several users reported breakage when BPF filter is used */
 	if (CLIENT_PORT == 68) {
 		/* Use only if standard port is in use */
 		/*
@@ -1041,7 +1040,6 @@ static int udhcp_raw_socket(int ifindex)
 				sizeof(filter_prog)) >= 0)
 			log1("Attached filter to raw socket fd"); // log?
 	}
-#endif
 
 	if (setsockopt(fd, SOL_PACKET, PACKET_AUXDATA,
 			&const_int_1, sizeof(int)) < 0
--
1.7.2.5

Best Regards, Vladislav Grishenko




More information about the busybox mailing list