Changed is_from_neighbor() function to is_from_upstream() for clarity