[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to have two static addresses on one interface?



In article <20021108143724.GA24844@nic.fr> (at Fri, 8 Nov 2002 15:37:24 +0100), Stephane Bortzmeyer <bortzmeyer@nic.fr> says:

> iface eth0 inet6 static
>         address FEC0:1:0:FF00::1
>         netmask 64
>         up ifconfig eth0 add 2001:0910::1/32
> 
> which does not seem very elegant: it hides the fact that none of the
> two addresses is "primary".

I've hacked source code.  how about this?

--- ifupdown-0.6.4/ifupdown.nw	Sat Nov  9 00:24:31 2002
+++ ifupdown-0.6.4-fix/ifupdown.nw	Sat Nov  9 00:35:57 2002
@@ -1761,6 +1761,7 @@
 static int duplicate_if(interface_defn *ifa, interface_defn *ifb) {
 	if (strcmp(ifa->iface, ifb->iface) != 0) return 0;
 	if (ifa->address_family != ifb->address_family) return 0;
+	if (strcmp(ifa->address_family->name, "inet6") == 0) return 0;
 	return 1;
 }
 @ 

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA



Reply to: