Fix ip spoof errors

@pixeltrix @strzalek backported as requested.