Optimized version. Less system CPU time used.
Noted by: pav
high loaded routers with tens interfaces and thousands hosts behind them. It's fast and does not depend on any side library. Some ideas was taken from Edwin's dhcprelay (net/dhcprelay) which has some shortages. It's distributed under BSD license.