mirror of
				https://gitea.osmocom.org/cellular-infrastructure/osmo-ggsn.git
				synced 2025-11-03 21:53:25 +00:00 
			
		
		
		
	gtp.c: no-op: use ntohs instead of htons
Even the operation is the same, the sin_port is in network order. Change-Id: Iebb031debfa7706f0ab682c94492b37573ae918d
This commit is contained in:
		@@ -69,7 +69,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define LOGP_WITH_ADDR(ss, level, addr, fmt, args...)                    \
 | 
					#define LOGP_WITH_ADDR(ss, level, addr, fmt, args...)                    \
 | 
				
			||||||
		LOGP(ss, level, "addr(%s:%d) " fmt,                      \
 | 
							LOGP(ss, level, "addr(%s:%d) " fmt,                      \
 | 
				
			||||||
		     inet_ntoa((addr).sin_addr), htons((addr).sin_port), \
 | 
							     inet_ntoa((addr).sin_addr), ntohs((addr).sin_port), \
 | 
				
			||||||
		     ##args)
 | 
							     ##args)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct rate_ctr_desc gsn_ctr_description[] = {
 | 
					static const struct rate_ctr_desc gsn_ctr_description[] = {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -68,7 +68,7 @@
 | 
				
			|||||||
#define GTP_LOGPKG(pri, peer, pack, len, fmt, args...)			\
 | 
					#define GTP_LOGPKG(pri, peer, pack, len, fmt, args...)			\
 | 
				
			||||||
	logp2(DLGTP, pri, __FILE__, __LINE__, 0,			\
 | 
						logp2(DLGTP, pri, __FILE__, __LINE__, 0,			\
 | 
				
			||||||
		"Packet from %s:%u, length: %d content: %s: " fmt,	\
 | 
							"Packet from %s:%u, length: %d content: %s: " fmt,	\
 | 
				
			||||||
		inet_ntoa((peer)->sin_addr), htons((peer)->sin_port),	\
 | 
							inet_ntoa((peer)->sin_addr), ntohs((peer)->sin_port),	\
 | 
				
			||||||
		len, osmo_hexdump((const uint8_t *) pack, len),		\
 | 
							len, osmo_hexdump((const uint8_t *) pack, len),		\
 | 
				
			||||||
		##args);
 | 
							##args);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user