(sourceroute): make it not break if the rfc2292 api does not exist
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9358 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -2566,6 +2566,8 @@ sourceroute(struct addrinfo *ai, | |||||||
| 		break; | 		break; | ||||||
| #ifdef INET6 | #ifdef INET6 | ||||||
| 	case AF_INET6: | 	case AF_INET6: | ||||||
|  | /* this needs to be updated for rfc2292bis */ | ||||||
|  | #ifdef IPV6_PKTOPTIONS | ||||||
| 		cmsg = inet6_rthdr_init(rhbuf, IPV6_RTHDR_TYPE_0); | 		cmsg = inet6_rthdr_init(rhbuf, IPV6_RTHDR_TYPE_0); | ||||||
| 		if (*cp != '@') | 		if (*cp != '@') | ||||||
| 			return -1; | 			return -1; | ||||||
| @@ -2573,6 +2575,9 @@ sourceroute(struct addrinfo *ai, | |||||||
| 		*protop = IPPROTO_IPV6; | 		*protop = IPPROTO_IPV6; | ||||||
| 		*optp = IPV6_PKTOPTIONS; | 		*optp = IPV6_PKTOPTIONS; | ||||||
| 		break; | 		break; | ||||||
|  | #else | ||||||
|  | 		return -1; | ||||||
|  | #endif | ||||||
| #endif | #endif | ||||||
| 	default: | 	default: | ||||||
| 		return -1; | 		return -1; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Assar Westerlund
					Assar Westerlund