Project

General

Profile

« Previous | Next » 

Revision 656f1763

Added by Seth Mos about 14 years ago

Correct typo in array name. Add select box for operating mode of rtadvd and dhcpv6 combination

View differences:

etc/inc/services.inc
96 96
		$rtadvdconf .= "{$realif}:\\\n";
97 97
		$rtadvdconf .= "\t:addr=\"{$subnetv6}\":\\\n";
98 98
		$rtadvdconf .= "\t:prefixlen#{$ifcfgsnv6}:\\\n";
99
		$rtadvdconf .= "\t:raflags#192:\n";
99
		switch($dhcpv6ifconf['mode']) {
100
			case "managed":
101
				$rtadvdconf .= "\t:raflags#64:\n";
102
				break;
103
			case "assist":
104
				$rtadvdconf .= "\t:raflags#192:\n";
105
				break;
106
			default:
107
				$rtadvdconf .= "\t:raflags#0:\n";
108
				break;				
109

  
110
		}
100 111
		$rtadvdconf .= "\n";
101 112

  
102 113
	}
......
697 708
		}
698 709
		*/
699 710
		
700
		$realif = escapeshellcmd(get_real_interface($dhcpv6if));
701
		$dhcpdv6ifs[] = $realif;
702
		/* Create link local address for bridges */
703
		if(stristr("$realif", "bridge")) {
704
			exec("ifconfig {$realif}|awk '/ether/ {print \$2}'", $mac);
705
			$autoaddress = generate_ipv6_from_mac(trim($mac[0]));
706
			mwexec("$ifconfig {$realif} inet6 fe80::{autoaddress}/64");
711
		if($config['dhcpdv6'][$dhcpv6if]['mode'] <> "unmanaged") {
712
			$realif = escapeshellcmd(get_real_interface($dhcpv6if));
713
			$dhcpdv6ifs[] = $realif;
714
			/* Create link local address for bridges */
715
			if(stristr("$realif", "bridge")) {
716
				mwexec("$ifconfig {$realif} inet6 fe80::/64 eui64");
717
			}
707 718
		}
708 719
	}
709 720

  

Also available in: Unified diff