On Thu, 03 May 2001 13:17:38 +1000,
Keith Owens <kaos@xxxxxxxxxx> wrote:
>Patch against 2.4.4 to remove all traces of CONFIG_IPV6_EUI64 and
>CONFIG_IPV6_NO_PB. EUI64 is now the only supported address scheme.
>I have not even compiled this patch, it is "obviously correct", except
>for the change to rt6_redirect() in net/ipv6/route.c. Is that code
>still required, even when eui64 is the _only_ option?
Answering my own question. The code is rt6_redirect() is required, new
version of patch follows.
Index: 4.1/net/ipv6/Config.in
--- 4.1/net/ipv6/Config.in Fri, 05 Jan 2001 13:42:29 +1100 kaos
(linux-2.4/e/40_Config.in 1.1 644)
+++ 4.1(w)/net/ipv6/Config.in Thu, 03 May 2001 12:55:12 +1000 kaos
(linux-2.4/e/40_Config.in 1.1 644)
@@ -1,10 +1,6 @@
#
# IPv6 configuration
#
-bool ' IPv6: enable EUI-64 token format' CONFIG_IPV6_EUI64
-if [ "$CONFIG_IPV6_EUI64" = "y" ]; then
- bool ' IPv6: disable provider based addresses' CONFIG_IPV6_NO_PB
-fi
if [ "$CONFIG_NETLINK" = "y" ]; then
if [ "$CONFIG_RTNETLINK" = "n" ]; then
bool ' IPv6: routing messages via old netlink' CONFIG_IPV6_NETLINK
Index: 4.1/net/ipv6/route.c
--- 4.1/net/ipv6/route.c Sat, 28 Apr 2001 10:05:23 +1000 kaos
(linux-2.4/e/42_route.c 1.2 644)
+++ 4.1(w)/net/ipv6/route.c Thu, 03 May 2001 13:54:15 +1000 kaos
(linux-2.4/e/42_route.c 1.2 644)
@@ -892,12 +892,6 @@ void rt6_redirect(struct in6_addr *dest,
if (!(rt->rt6i_flags&RTF_GATEWAY))
goto out;
-#if !defined(CONFIG_IPV6_EUI64) || defined(CONFIG_IPV6_NO_PB)
- /*
- * During transition gateways have more than
- * one link local address. Certainly, it is violation
- * of basic principles, but it is temporary.
- */
/*
* RFC 1970 specifies that redirects should only be
* accepted if they come from the nexthop to the target.
@@ -929,7 +923,6 @@ void rt6_redirect(struct in6_addr *dest,
}
source_ok:
-#endif
/*
* We have finally decided to accept it.
Index: 4.1/net/ipv6/ndisc.c
--- 4.1/net/ipv6/ndisc.c Sat, 28 Apr 2001 10:05:23 +1000 kaos
(linux-2.4/f/0_ndisc.c 1.1.1.3 644)
+++ 4.1(w)/net/ipv6/ndisc.c Thu, 03 May 2001 13:05:29 +1000 kaos
(linux-2.4/f/0_ndisc.c 1.1.1.3 644)
@@ -242,14 +242,8 @@ static int pndisc_constructor(struct pne
if (dev == NULL || __in6_dev_get(dev) == NULL)
return -EINVAL;
-#ifndef CONFIG_IPV6_NO_PB
- addrconf_addr_solict_mult_old(addr, &maddr);
+ addrconf_addr_solict_mult(addr, &maddr);
ipv6_dev_mc_inc(dev, &maddr);
-#endif
-#ifdef CONFIG_IPV6_EUI64
- addrconf_addr_solict_mult_new(addr, &maddr);
- ipv6_dev_mc_inc(dev, &maddr);
-#endif
return 0;
}
@@ -261,14 +255,8 @@ static void pndisc_destructor(struct pne
if (dev == NULL || __in6_dev_get(dev) == NULL)
return;
-#ifndef CONFIG_IPV6_NO_PB
- addrconf_addr_solict_mult_old(addr, &maddr);
- ipv6_dev_mc_dec(dev, &maddr);
-#endif
-#ifdef CONFIG_IPV6_EUI64
- addrconf_addr_solict_mult_new(addr, &maddr);
+ addrconf_addr_solict_mult(addr, &maddr);
ipv6_dev_mc_dec(dev, &maddr);
-#endif
}
@@ -550,14 +538,8 @@ static void ndisc_solicit(struct neighbo
neigh_app_ns(neigh);
#endif
} else {
-#ifdef CONFIG_IPV6_EUI64
- addrconf_addr_solict_mult_new(target, &mcaddr);
- ndisc_send_ns(dev, NULL, target, &mcaddr, saddr);
-#endif
-#ifndef CONFIG_IPV6_NO_PB
- addrconf_addr_solict_mult_old(target, &mcaddr);
+ addrconf_addr_solict_mult(target, &mcaddr);
ndisc_send_ns(dev, NULL, target, &mcaddr, saddr);
-#endif
}
}
Index: 4.1/net/ipv6/addrconf.c
--- 4.1/net/ipv6/addrconf.c Sat, 28 Apr 2001 18:38:57 +1000 kaos
(linux-2.4/f/9_addrconf.c 1.3 644)
+++ 4.1(w)/net/ipv6/addrconf.c Thu, 03 May 2001 13:05:45 +1000 kaos
(linux-2.4/f/9_addrconf.c 1.3 644)
@@ -639,14 +639,8 @@ static void addrconf_join_solict(struct
if (dev->flags&(IFF_LOOPBACK|IFF_NOARP))
return;
-#ifndef CONFIG_IPV6_NO_PB
- addrconf_addr_solict_mult_old(addr, &maddr);
+ addrconf_addr_solict_mult(addr, &maddr);
ipv6_dev_mc_inc(dev, &maddr);
-#endif
-#ifdef CONFIG_IPV6_EUI64
- addrconf_addr_solict_mult_new(addr, &maddr);
- ipv6_dev_mc_inc(dev, &maddr);
-#endif
}
static void addrconf_leave_solict(struct net_device *dev, struct in6_addr
*addr)
@@ -656,18 +650,11 @@ static void addrconf_leave_solict(struct
if (dev->flags&(IFF_LOOPBACK|IFF_NOARP))
return;
-#ifndef CONFIG_IPV6_NO_PB
- addrconf_addr_solict_mult_old(addr, &maddr);
+ addrconf_addr_solict_mult(addr, &maddr);
ipv6_dev_mc_dec(dev, &maddr);
-#endif
-#ifdef CONFIG_IPV6_EUI64
- addrconf_addr_solict_mult_new(addr, &maddr);
- ipv6_dev_mc_dec(dev, &maddr);
-#endif
}
-#ifdef CONFIG_IPV6_EUI64
static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
{
switch (dev->type) {
@@ -702,7 +689,6 @@ static int ipv6_inherit_eui64(u8 *eui, s
read_unlock_bh(&idev->lock);
return err;
}
-#endif
/*
* Add prefix route.
@@ -876,7 +862,6 @@ void addrconf_prefix_rcv(struct net_devi
plen = pinfo->prefix_len >> 3;
-#ifdef CONFIG_IPV6_EUI64
if (pinfo->prefix_len == 64) {
memcpy(&addr, &pinfo->prefix, 8);
if (ipv6_generate_eui64(addr.s6_addr + 8, dev) &&
@@ -886,15 +871,6 @@ void addrconf_prefix_rcv(struct net_devi
}
goto ok;
}
-#endif
-#ifndef CONFIG_IPV6_NO_PB
- if (pinfo->prefix_len == ((sizeof(struct in6_addr) -
dev->addr_len)<<3)) {
- memcpy(&addr, &pinfo->prefix, plen);
- memcpy(addr.s6_addr + plen, dev->dev_addr,
- dev->addr_len);
- goto ok;
- }
-#endif
printk(KERN_DEBUG "IPv6 addrconf: prefix with wrong length
%d\n", pinfo->prefix_len);
in6_dev_put(in6_dev);
return;
@@ -1224,7 +1200,6 @@ static void addrconf_dev_config(struct n
if (idev == NULL)
return;
-#ifdef CONFIG_IPV6_EUI64
memset(&addr, 0, sizeof(struct in6_addr));
addr.s6_addr[0] = 0xFE;
@@ -1232,18 +1207,6 @@ static void addrconf_dev_config(struct n
if (ipv6_generate_eui64(addr.s6_addr + 8, dev) == 0)
addrconf_add_linklocal(idev, &addr);
-#endif
-
-#ifndef CONFIG_IPV6_NO_PB
- memset(&addr, 0, sizeof(struct in6_addr));
-
- addr.s6_addr[0] = 0xFE;
- addr.s6_addr[1] = 0x80;
-
- memcpy(addr.s6_addr + (sizeof(struct in6_addr) - dev->addr_len),
- dev->dev_addr, dev->addr_len);
- addrconf_add_linklocal(idev, &addr);
-#endif
}
static void addrconf_sit_config(struct net_device *dev)
@@ -1514,14 +1477,8 @@ static void addrconf_dad_timer(unsigned
/* send a neighbour solicitation for our addr */
memset(&unspec, 0, sizeof(unspec));
-#ifdef CONFIG_IPV6_EUI64
- addrconf_addr_solict_mult_new(&ifp->addr, &mcaddr);
+ addrconf_addr_solict_mult(&ifp->addr, &mcaddr);
ndisc_send_ns(ifp->idev->dev, NULL, &ifp->addr, &mcaddr, &unspec);
-#endif
-#ifndef CONFIG_IPV6_NO_PB
- addrconf_addr_solict_mult_old(&ifp->addr, &mcaddr);
- ndisc_send_ns(ifp->idev->dev, NULL, &ifp->addr, &mcaddr, &unspec);
-#endif
in6_ifa_put(ifp);
}
Index: 4.1/include/net/addrconf.h
--- 4.1/include/net/addrconf.h Sat, 28 Apr 2001 10:05:23 +1000 kaos
(linux-2.4/I/25_addrconf.h 1.2 644)
+++ 4.1(w)/include/net/addrconf.h Thu, 03 May 2001 13:05:04 +1000 kaos
(linux-2.4/I/25_addrconf.h 1.2 644)
@@ -158,16 +158,8 @@ static __inline__ u8 ipv6_addr_hash(stru
* compute link-local solicited-node multicast address
*/
-static inline void addrconf_addr_solict_mult_old(struct in6_addr *addr,
- struct in6_addr *solicited)
-{
- ipv6_addr_set(solicited,
- __constant_htonl(0xFF020000), 0,
- __constant_htonl(0x1), addr->s6_addr32[3]);
-}
-
-static inline void addrconf_addr_solict_mult_new(struct in6_addr *addr,
- struct in6_addr *solicited)
+static inline void addrconf_addr_solict_mult(struct in6_addr *addr,
+ struct in6_addr *solicited)
{
ipv6_addr_set(solicited,
__constant_htonl(0xFF020000), 0,
Index: 4.1/arch/arm/def-configs/ebsa110
--- 4.1/arch/arm/def-configs/ebsa110 Fri, 05 Jan 2001 13:42:29 +1100 kaos
(linux-2.4/u/c/36_ebsa110 1.1 644)
+++ 4.1(w)/arch/arm/def-configs/ebsa110 Thu, 03 May 2001 12:55:33 +1000 kaos
(linux-2.4/u/c/36_ebsa110 1.1 644)
@@ -192,8 +192,6 @@ CONFIG_IP_NF_COMPAT_IPCHAINS=m
CONFIG_IP_NF_NAT_NEEDED=y
# CONFIG_IP_NF_COMPAT_IPFWADM is not set
CONFIG_IPV6=m
-CONFIG_IPV6_EUI64=y
-# CONFIG_IPV6_NO_PB is not set
#
# IPv6: Netfilter Configuration
Index: 4.1/arch/sparc64/defconfig
--- 4.1/arch/sparc64/defconfig Sat, 28 Apr 2001 10:05:23 +1000 kaos
(linux-2.4/z/c/47_defconfig 1.10 644)
+++ 4.1(w)/arch/sparc64/defconfig Thu, 03 May 2001 12:55:22 +1000 kaos
(linux-2.4/z/c/47_defconfig 1.10 644)
@@ -178,7 +178,6 @@ CONFIG_INET=y
CONFIG_INET_ECN=y
# CONFIG_SYN_COOKIES is not set
CONFIG_IPV6=m
-# CONFIG_IPV6_EUI64 is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
Index: 4.1/arch/sparc/defconfig
--- 4.1/arch/sparc/defconfig Mon, 26 Mar 2001 17:16:03 +1000 kaos
(linux-2.4/P/c/7_defconfig 1.3 644)
+++ 4.1(w)/arch/sparc/defconfig Thu, 03 May 2001 12:55:18 +1000 kaos
(linux-2.4/P/c/7_defconfig 1.3 644)
@@ -148,7 +148,6 @@ CONFIG_INET=y
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
CONFIG_IPV6=m
-# CONFIG_IPV6_EUI64 is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
Index: 4.1/Documentation/Configure.help
--- 4.1/Documentation/Configure.help Tue, 24 Apr 2001 10:55:55 +1000 kaos
(linux-2.4/Z/c/10_Configure. 1.1.2.8.2.10 644)
+++ 4.1(w)/Documentation/Configure.help Thu, 03 May 2001 12:56:08 +1000 kaos
(linux-2.4/Z/c/10_Configure. 1.1.2.8.2.10 644)
@@ -4170,22 +4170,6 @@ CONFIG_IPV6
It is safe to say N here for now.
-IPv6: enable EUI-64 token format
-CONFIG_IPV6_EUI64
- 6bone, the network of computers using the IPv6 protocol, is moving
- to a new aggregatable address format and a new link local address
- assignment (EUI-64). Say Y if your site has upgraded already, or
- has started to upgrade.
-
-IPv6: disable provider based addresses
-CONFIG_IPV6_NO_PB
- Linux tries to operate correctly when your site has moved to EUI-64
- only partially. Unfortunately, the two address formats (old:
- "provider based" and new: "aggregatable") are incompatible. Say Y if
- your site finished the upgrade to EUI-64, and/or you encountered
- some problems caused by the presence of two link-local addresses on
- an interface.
-
IPv6: routing messages via old netlink
CONFIG_IPV6_NETLINK
You can say Y here to receive routing messages from the IPv6 code
|