remove comments
This commit is contained in:
		
							parent
							
								
									97a5b5c7cb
								
							
						
					
					
						commit
						f2a9bdfafc
					
				| @ -20,14 +20,12 @@ wg_peer generate_new_peer(wg_key *pub_key, char *ip, unsigned short port) { | ||||
| 
 | ||||
|   wg_peer new_peer = { | ||||
| 		.flags = WGPEER_HAS_PUBLIC_KEY, | ||||
|     //.public_key = pub_key,
 | ||||
|     .first_allowedip = ipv4, | ||||
|     .last_allowedip = ipv6, | ||||
|     .endpoint = generate_endponit (ip, port), | ||||
| 	}; | ||||
|   printf("protocol 0.101: %d\n",new_peer.endpoint.addr.sa_family); | ||||
|   printf("protocol 0.102: %d\n",new_peer.endpoint.addr4.sin_family); | ||||
|   //strcpy(new_peer.public_key, pub_key);
 | ||||
|   memcpy(new_peer.public_key, pub_key, sizeof (wg_key)); | ||||
|   printf("protocol 0.111: %d\n",new_peer.endpoint.addr.sa_family); | ||||
|   printf("protocol 0.112: %d\n",new_peer.endpoint.addr4.sin_family); | ||||
| @ -40,16 +38,13 @@ wg_device generate_new_device(wg_key *priv_key, | ||||
|                               wg_peer peer) | ||||
| { | ||||
|   wg_device new_device = { | ||||
|     //.private_key = priv_key,
 | ||||
|     .listen_port = port, | ||||
|     .flags = WGDEVICE_HAS_PRIVATE_KEY | WGDEVICE_HAS_LISTEN_PORT, | ||||
|     .first_peer = &peer, | ||||
|     .last_peer = &peer, | ||||
|   }; | ||||
|   memcpy(new_device.name, device_name, sizeof (char[IFNAMSIZ])); | ||||
|   //strcpy(new_device.name, device_name);
 | ||||
|   memcpy(new_device.private_key, priv_key, sizeof (wg_key)); | ||||
|   //strcpy(new_device.private_key, priv_key);
 | ||||
|   printf("str2: %s\n",new_device.name); | ||||
|   wg_key_b64_string key, key2; | ||||
|   wg_key_to_base64(key, new_device.first_peer->public_key); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user