View | Details | Raw Unified | Return to bug 155177
Collapse All | Expand All

(-)sys/net/route.c (-5 / +3 lines)
Lines 946-952 Link Here
946
			RT_LOCK(rto);
946
			RT_LOCK(rto);
947
			rto->rt_flags |= RTF_UP;
947
			rto->rt_flags |= RTF_UP;
948
			RT_UNLOCK(rto);
948
			RT_UNLOCK(rto);
949
		} else if (rt->rt_flags & RTF_GATEWAY) {
949
		} else if (gateway && rt->rt_flags & RTF_GATEWAY) {
950
			/*
950
			/*
951
			 * For gateway routes, we need to 
951
			 * For gateway routes, we need to 
952
			 * make sure that we we are deleting
952
			 * make sure that we we are deleting
Lines 955-963 Link Here
955
			 * check the case when there is only
955
			 * check the case when there is only
956
			 * one route in the chain.  
956
			 * one route in the chain.  
957
			 */
957
			 */
958
			if (gateway &&
958
			if (rt->rt_gateway->sa_len != gateway->sa_len ||
959
			    (rt->rt_gateway->sa_len != gateway->sa_len ||
959
			    memcmp(rt->rt_gateway, gateway, gateway->sa_len))
960
				memcmp(rt->rt_gateway, gateway, gateway->sa_len)))
961
				error = ESRCH;
960
				error = ESRCH;
962
			else {
961
			else {
963
				/*
962
				/*
Lines 1002-1008 Link Here
1002
nondelete:
1001
nondelete:
1003
	if (req != RTM_DELETE)
1002
	if (req != RTM_DELETE)
1004
		panic("unrecognized request %d", req);
1003
		panic("unrecognized request %d", req);
1005
	
1006
1004
1007
	/*
1005
	/*
1008
	 * If the caller wants it, then it can have it,
1006
	 * If the caller wants it, then it can have it,

Return to bug 155177