This may be useful if multple interfaces share the same network range. Thanks to Fritz Grimpen for the original patch.