mirror of
				https://github.com/h44z/wg-portal.git
				synced 2025-11-03 23:56:18 +00:00 
			
		
		
		
	fix nilpointer dereference
This commit is contained in:
		@@ -282,7 +282,8 @@ func (r *WgRepo) updateWireGuardInterface(pi *domain.PhysicalInterface) error {
 | 
			
		||||
 | 
			
		||||
	var fwMark *int
 | 
			
		||||
	if pi.FirewallMark != 0 {
 | 
			
		||||
		*fwMark = int(pi.FirewallMark)
 | 
			
		||||
		intFwMark := int(pi.FirewallMark)
 | 
			
		||||
		fwMark = &intFwMark
 | 
			
		||||
	}
 | 
			
		||||
	err = r.wg.ConfigureDevice(string(pi.Identifier), wgtypes.Config{
 | 
			
		||||
		PrivateKey:   &pKey,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user