Use AF_UNSPEC instead of AF_UNKNOWN for unspecified local address in add_edge_h().