working for the scenario when the packet does not come from source switch
always use the first packet only while computing current path