Am Mittwoch, 16. Januar 2008 23:28 schrieb Cristian Ionescu-Idbohrn:
> The comment in networking/udhcp/clientsocket.c gives credit to Stefan
> Rompf <[EMAIL PROTECTED]>, I've shamelessly stolen the LPF/BPF-filter from.
> I hereby aknowledge his involuntary contribution to this project :) I
> don't think there should be any copyright and/or licensing problems here.
It's perfectly fine with me if you use this code in udhcpc, also with later
versions of the GPL as your license allows.
One minor nitpick:
> + if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, &filter_prog,
> + sizeof(filter_prog)) < 0)
> + bb_perror_msg_and_die("setsockopt");
> + DEBUG("attached filter to raw socket fdr %d", fd);
I remember that is has been possible to configure older kernels withouth BPF.
2.6.? now always includes BPF, but 2.4.32 still has the CONFIG_FILTER option.
Depending on how much backward compatibility you want this should fail more
gracefully and not terminate the client if errno is ENOPROTOOPT.
> In my big comment inside networking/udhcp/clientsocket.c I'm also trying
> to pinpoint some ideas that I'm very fond of and Stefan puts words on. I
> think those ideas (if implemented in busybox) would be a big lift for this
> project,
Once you get used to that features, you can't imagine that you needed a manual
ifdown/ifup sequence on network change before. Just note that the netlink
notifications are 2.6 only stuff and can break the client on 2.4.
Unavoidable shameless advertisement: dhcpclient also compiles with uclibc to a
small executable, so just use it before reimplementing too many features ;-)
Stefan
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox