[PATCH 1/2] centralize layer 3 packet handling