gluon-radv-filterd: Fix byte order of nd_ra_router_lifetime
The ICMPv6 packet is stored in network byte order. It must therefore always be converted to host byteorder before it can be used in calculations. Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
		
							parent
							
								
									2d6cd71f82
								
							
						
					
					
						commit
						07a760494b
					
				@ -332,7 +332,7 @@ static void handle_ra(int sock) {
 | 
			
		||||
	memcpy(&mac, src.sll_addr, sizeof(mac));
 | 
			
		||||
	DEBUG_MSG("received valid RA from " F_MAC, F_MAC_VAR(mac));
 | 
			
		||||
 | 
			
		||||
	router_update(&mac, pkt.ra.nd_ra_router_lifetime);
 | 
			
		||||
	router_update(&mac, ntohs(pkt.ra.nd_ra_router_lifetime));
 | 
			
		||||
 | 
			
		||||
check_failed:
 | 
			
		||||
	return;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user