mirror of https://github.com/wb2osz/direwolf.git
				
				
				
			Check 3rd party payload for APRS type #428
This commit is contained in:
		
							parent
							
								
									397362787f
								
							
						
					
					
						commit
						858749628f
					
				| 
						 | 
				
			
			@ -869,6 +869,19 @@ static int filt_t (pfstate_t *pf)
 | 
			
		|||
 | 
			
		||||
	assert (infop != NULL);
 | 
			
		||||
 | 
			
		||||
	if(*infop == '}') {
 | 
			
		||||
		// We have a 3d party packet, dig inside it to get the actual type.
 | 
			
		||||
		packet_t pp_payload = ax25_from_text ((char*)infop+1, 0);
 | 
			
		||||
		if (pp_payload == NULL) {
 | 
			
		||||
			print_error (pf, "Invalid third party payload\n");
 | 
			
		||||
			return (0);
 | 
			
		||||
		}
 | 
			
		||||
		memset (src, 0, sizeof(src));
 | 
			
		||||
		ax25_get_addr_with_ssid (pp_payload, AX25_SOURCE, src);
 | 
			
		||||
		(void) ax25_get_info (pp_payload, (unsigned char **)(&infop));
 | 
			
		||||
		ax25_delete(pp_payload);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for (f = pf->token_str + 2; *f != '\0'; f++) {
 | 
			
		||||
	  switch (*f) {
 | 
			
		||||
	
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue