--- - branch: netbsd-8 date: Sat Jun 10 06:30:07 UTC 2017 files: - new: 1.6.8.1 old: '1.6' path: src/external/bsd/dhcp/dist/relay/dhcrelay.c pathrev: src/external/bsd/dhcp/dist/relay/dhcrelay.c@1.6.8.1 type: modified id: 20170610T063007Z.147b392ba4eff4e8172ff14c7556fc01440127e8 log: "Pull up following revision(s) (requested by manu in ticket #27):\n\texternal/bsd/dhcp/dist/relay/dhcrelay.c: revision 1.7\nFix buggy dhcrelay(8) requirement to stay in foreground\nThis version of dhcrelay(8) needed to stay inforeground with -d flag in\norder to service requests. Running inbackground turned it deaf to DHCP\nrequests.\nThis was caused by wrong kqueue(2) usage, where kevent(2) was used with\na file descriptor obtained by a kqueue(2) call done before fork(2).\nkqueue(2) man page says \"The queue is not inherited by a child created\nwith fork(2)\". As a result, kevent(2) calls always got EBADF.\nThe fix is to reorder function calls in dhcrelay(8) main() function.\ndhcp_context_create(), which causes kqueue(2) to be invoked, is\nmoved with its dependencies after fork(2). This matches the code layout\nof dhclient(8) and dhcpd(8), which do not have the bug.\nThe fix was not submitted upstream since latest ISC DHCP code was\nrefactored and does not have the bug anymore.\n" module: src subject: 'CVS commit: [netbsd-8] src/external/bsd/dhcp/dist/relay' unixtime: '1497076207' user: snj