mirror of
				https://github.com/vyos/vyos-build.git
				synced 2025-10-01 20:28:40 +02:00 
			
		
		
		
	This commit adds a patch to the WIDE DHCPv6 client forcing it to bind to the last network interface specified on the command line, allowing multiple concurrent instances of the daemon running without having a single daemon receiving all the incoming DHCPv6 packets.
		
			
				
	
	
		
			18 lines
		
	
	
		
			387 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			387 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
| diff --git a/dhcp6c.c b/dhcp6c.c
 | |
| index 1caaaa5..04ce9c5 100644
 | |
| --- a/dhcp6c.c
 | |
| +++ b/dhcp6c.c
 | |
| @@ -217,6 +217,12 @@ main(argc, argv)
 | |
|  			    argv[0]);
 | |
|  			exit(1);
 | |
|  		}
 | |
| +
 | |
| +        if (setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, argv[0], strlen(argv[0])) != 0) {
 | |
| +            debug_printf(LOG_ERR, FNAME, "failed to bind %s", argv[0]);
 | |
| +            exit(1);
 | |
| +        }
 | |
| +
 | |
|  		argv++;
 | |
|  	}
 | |
|  
 |