git: userland - dhclient - Fix possible infinite loop

看板DFBSD_commit作者時間15年前 (2010/09/09 09:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit db2a08265dc67538d417f14ccdc9fdef6fb0d60b Author: Samuel J. Greear <sjg@thesjg.com> Date: Thu Sep 9 01:12:31 2010 +0000 userland - dhclient - Fix possible infinite loop FreeBSD commit message: It is possible for bpf to return a length such that: length != BPF_WORDALIGN(length) This meeans that it is possible for this to be true: interface->rbuf_offset > interface->rbuf_len Handle this case in the test for running out of packets. While OpenBSD's solution of setting interface->rbuf_len to BPF_WORDALIGN(length) is safe due to the size of the buffer, I think this solution results in less hidden assumptions. This should fix the problem of dhclient running away and consuming 100% CPU. PR: bin/102226 Submitted by: Joost Bekkers <joost at jodocus.org> Reported-by: Many Obtained-from: FreeBSD Summary of changes: sbin/dhclient/bpf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/db2a08265dc67538d417f14ccdc9fdef6fb0d60b -- DragonFly BSD source repository
文章代碼(AID): #1CY3aLF1 (DFBSD_commit)