Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 316111 Details for
Bug 458270
[TAHI] DAD test failure when ipv6_autoconf=yes
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
new patch to add required sysctls
linux-kernel-test.patch (text/plain), 11.67 KB, created by
Neil Horman
on 2008-09-08 19:12:12 UTC
(
hide
)
Description:
new patch to add required sysctls
Filename:
MIME Type:
Creator:
Neil Horman
Created:
2008-09-08 19:12:12 UTC
Size:
11.67 KB
patch
obsolete
>--- linux-2.6.18.noarch/include/asm-x86_64/e820.h.orig 2008-09-08 07:18:10.000000000 -0400 >+++ linux-2.6.18.noarch/include/asm-x86_64/e820.h 2008-09-08 07:21:41.000000000 -0400 >@@ -60,8 +60,6 @@ > extern void __init parse_memopt(char *p, char **end); > extern void __init parse_memmapopt(char *p, char **end); > >-extern void __init finish_e820_parsing(void); >- > extern struct e820map e820; > > extern unsigned ebda_addr, ebda_size; >--- linux-2.6.18.noarch/include/linux/sysctl.h.orig 2008-09-08 07:18:10.000000000 -0400 >+++ linux-2.6.18.noarch/include/linux/sysctl.h 2008-09-08 08:47:18.000000000 -0400 >@@ -577,6 +577,9 @@ > NET_IPV6_ACCEPT_RA_RTR_PREF=20, > NET_IPV6_RTR_PROBE_INTERVAL=21, > NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=22, >+#define NET_IPV6_SYSCTL_EXTENDED_BOUNDARY NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN >+ NET_IPV6_DISABLE=23, >+ NET_IPV6_ACCEPT_DAD=24, > __NET_IPV6_MAX > }; > >--- linux-2.6.18.noarch/include/linux/if.h.orig 2008-09-08 07:17:44.000000000 -0400 >+++ linux-2.6.18.noarch/include/linux/if.h 2008-09-08 08:47:18.000000000 -0400 >@@ -61,6 +61,7 @@ > #define IFF_MASTER_ALB 0x10 /* bonding master, balance-alb. */ > #define IFF_BONDING 0x20 /* bonding master or slave */ > #define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */ >+#define IFF_EXTENDED 0x80 /* Extended data available */ > > #define IF_GET_IFACE 0x0001 /* for querying only */ > #define IF_GET_PROTO 0x0002 >--- linux-2.6.18.noarch/include/linux/ipv6.h.orig 2008-09-08 07:17:53.000000000 -0400 >+++ linux-2.6.18.noarch/include/linux/ipv6.h 2008-09-08 08:47:18.000000000 -0400 >@@ -182,6 +182,8 @@ > DEVCONF_ACCEPT_RA_RTR_PREF, > DEVCONF_RTR_PROBE_INTERVAL, > DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN, >+ DEVCONF_DISABLE_IPV6, >+ DEVCONF_ACCEPT_DAD, > DEVCONF_MAX > }; > >--- linux-2.6.18.noarch/include/linux/netdevice.h.orig 2008-09-08 07:17:53.000000000 -0400 >+++ linux-2.6.18.noarch/include/linux/netdevice.h 2008-09-08 08:47:18.000000000 -0400 >@@ -535,6 +535,23 @@ > struct class_device class_dev; > /* space for optional statistics and wireless sysfs groups */ > struct attribute_group *sysfs_groups[3]; >+#ifndef __GENKSYMS__ >+ unsigned short priv_len; >+#endif >+}; >+ >+/* >+ * struct net_device can't be modified without breaking ABI, so we >+ * add net_device_extended to the end in alloc_netdev. Anything that >+ * needs to be added to a net_device can be appended here >+ */ >+struct ipv6_devconf_extensions { >+ s32 disable_ipv6; >+ s32 accept_dad; >+}; >+ >+struct net_device_extended { >+ struct ipv6_devconf_extensions ipv6_devconf_ext; > }; > > #define NETDEV_ALIGN 32 >@@ -547,6 +564,14 @@ > & ~NETDEV_ALIGN_CONST); > } > >+static inline struct net_device_extended *dev_extended(struct net_device *dev) >+{ >+ if (!(dev->priv_flags & IFF_EXTENDED)) >+ return NULL; >+ return (struct net_device_extended *) ((char *) netdev_priv(dev) + >+ ((dev->priv_len + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST)); >+} >+ > #define SET_MODULE_OWNER(dev) do { } while (0) > /* Set the sysfs physical device reference for the network logical device > * if set prior to registration will cause a symlink during initialization. >--- linux-2.6.18.noarch/net/core/dev.c.orig 2008-09-08 07:17:54.000000000 -0400 >+++ linux-2.6.18.noarch/net/core/dev.c 2008-09-08 08:47:18.000000000 -0400 >@@ -3257,7 +3257,8 @@ > > /* ensure 32-byte alignment of both the device and private area */ > alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST; >- alloc_size += sizeof_priv + NETDEV_ALIGN_CONST; >+ alloc_size += (sizeof_priv + NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST; >+ alloc_size += sizeof(struct net_device_extended) + NETDEV_ALIGN_CONST; > > p = kzalloc(alloc_size, GFP_KERNEL); > if (!p) { >@@ -3274,6 +3275,8 @@ > > setup(dev); > strcpy(dev->name, name); >+ dev->priv_flags |= IFF_EXTENDED; >+ dev->priv_len = sizeof_priv; > return dev; > } > EXPORT_SYMBOL(alloc_netdev); >--- linux-2.6.18.noarch/net/ipv6/ip6_output.c.orig 2008-09-08 07:18:09.000000000 -0400 >+++ linux-2.6.18.noarch/net/ipv6/ip6_output.c 2008-09-08 08:47:18.000000000 -0400 >@@ -149,6 +149,15 @@ > > int ip6_output(struct sk_buff *skb) > { >+ struct inet6_dev *idev = ip6_dst_idev(skb->dst); >+ struct net_device_extended *ext = dev_extended(idev->dev); >+ >+ if (unlikely(!ext && ext->ipv6_devconf_ext.disable_ipv6)) { >+ IP6_INC_STATS(idev, IPSTATS_MIB_OUTDISCARDS); >+ kfree_skb(skb); >+ return 0; >+ } >+ > if ((skb->len > dst_mtu(skb->dst) && !skb_is_gso(skb)) || > dst_allfrag(skb->dst)) > return ip6_fragment(skb, ip6_output2); >--- linux-2.6.18.noarch/net/ipv6/ip6_input.c.orig 2008-09-08 07:18:10.000000000 -0400 >+++ linux-2.6.18.noarch/net/ipv6/ip6_input.c 2008-09-08 08:47:18.000000000 -0400 >@@ -61,6 +61,7 @@ > struct ipv6hdr *hdr; > u32 pkt_len; > struct inet6_dev *idev; >+ struct net_device_extended *ext = dev_extended(dev); > > if (skb->pkt_type == PACKET_OTHERHOST) { > kfree_skb(skb); >@@ -73,7 +74,8 @@ > > IP6_INC_STATS_BH(idev, IPSTATS_MIB_INRECEIVES); > >- if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) { >+ if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL || >+ !ext || unlikely(ext->ipv6_devconf_ext.disable_ipv6)) { > IP6_INC_STATS_BH(idev, IPSTATS_MIB_INDISCARDS); > rcu_read_unlock(); > goto out; >--- linux-2.6.18.noarch/net/ipv6/addrconf.c.orig 2008-09-08 07:18:09.000000000 -0400 >+++ linux-2.6.18.noarch/net/ipv6/addrconf.c 2008-09-08 13:42:51.000000000 -0400 >@@ -131,6 +131,7 @@ > > static int addrconf_ifdown(struct net_device *dev, int how); > >+static int ipv6_generate_eui64(u8 *eui, struct net_device *dev); > static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags); > static void addrconf_dad_timer(unsigned long data); > static void addrconf_dad_completed(struct inet6_ifaddr *ifp); >@@ -176,6 +177,11 @@ > #endif > }; > >+struct ipv6_devconf_extensions ipv6_devconf_extensions = { >+ .disable_ipv6 = 0, >+ .accept_dad = 1, >+}; >+ > static struct ipv6_devconf ipv6_devconf_dflt = { > .forwarding = 0, > .hop_limit = IPV6_DEFAULT_HOPLIMIT, >@@ -206,6 +212,11 @@ > #endif > }; > >+static struct ipv6_devconf_extensions ipv6_devconf_extensions_dflt = { >+ .disable_ipv6 = 0, >+ .accept_dad = 1, >+}; >+ > int sysctl_ip6_odad = 0; > > /* IPv6 Wildcard Address and Loopback Address defined by RFC2553 */ >@@ -347,6 +358,7 @@ > { > struct inet6_dev *ndev; > struct in6_addr maddr; >+ struct net_device_extended *ext = dev_extended(dev); > > ASSERT_RTNL(); > >@@ -361,6 +373,10 @@ > rwlock_init(&ndev->lock); > ndev->dev = dev; > memcpy(&ndev->cnf, &ipv6_devconf_dflt, sizeof(ndev->cnf)); >+ if (ext != NULL) { >+ memcpy(&ext->ipv6_devconf_ext, &ipv6_devconf_extensions_dflt, >+ sizeof(ext->ipv6_devconf_ext)); >+ } > ndev->cnf.mtu6 = dev->mtu; > ndev->cnf.sysctl = NULL; > ndev->nd_parms = neigh_parms_alloc(dev, &nd_tbl); >@@ -396,6 +412,9 @@ > */ > in6_dev_hold(ndev); > >+ if (ext && (dev->flags & (IFF_NOARP | IFF_LOOPBACK))) >+ ext->ipv6_devconf_ext.accept_dad = -1; >+ > #ifdef CONFIG_IPV6_PRIVACY > init_timer(&ndev->regen_timer); > ndev->regen_timer.function = ipv6_regen_rndid; >@@ -1339,6 +1358,25 @@ > > void addrconf_dad_failure(struct inet6_ifaddr *ifp) > { >+ struct inet6_dev *idev = ifp->idev; >+ struct net_device_extended *ext; >+ >+ ext = (idev->dev == NULL) ? NULL : dev_extended(idev->dev); >+ >+ if (ext && ext->ipv6_devconf_ext.accept_dad > 1 && >+ !ext->ipv6_devconf_ext.disable_ipv6) { >+ struct in6_addr addr; >+ >+ addr.s6_addr32[0] = htonl(0xfe800000); >+ addr.s6_addr32[1] = 0; >+ >+ if (!ipv6_generate_eui64(addr.s6_addr + 8, idev->dev) && >+ ipv6_addr_equal(&ifp->addr, &addr)) { >+ /* DAD failed for link-local based on MAC address */ >+ ext->ipv6_devconf_ext.disable_ipv6 = 1; >+ } >+ } >+ > if (net_ratelimit()) > printk(KERN_INFO "%s: duplicate address detected!\n", ifp->idev->dev->name); > addrconf_dad_stop(ifp); >@@ -2623,12 +2661,21 @@ > struct inet6_dev *idev = ifp->idev; > struct in6_addr unspec; > struct in6_addr mcaddr; >+ struct net_device_extended *ext = (idev == NULL) ? NULL : dev_extended(idev->dev); > > read_lock_bh(&idev->lock); > if (idev->dead) { > read_unlock_bh(&idev->lock); > goto out; > } >+ >+ if (ext && ext->ipv6_devconf_ext.accept_dad > 1 && >+ ext->ipv6_devconf_ext.disable_ipv6) { >+ read_unlock_bh(&idev->lock); >+ addrconf_dad_failure(ifp); >+ return; >+ } >+ > spin_lock_bh(&ifp->lock); > if (ifp->probes == 0) { > /* >@@ -3374,7 +3421,7 @@ > netlink_broadcast(rtnl, skb, 0, RTNLGRP_IPV6_IFADDR, GFP_ATOMIC); > } > >-static void inline ipv6_store_devconf(struct ipv6_devconf *cnf, >+static void inline ipv6_store_devconf(struct ipv6_devconf *cnf, struct ipv6_devconf_extensions *xcnf, > __s32 *array, int bytes) > { > memset(array, 0, bytes); >@@ -3406,6 +3453,10 @@ > array[DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN] = cnf->accept_ra_rt_info_max_plen; > #endif > #endif >+ if (xcnf) { >+ array[DEVCONF_DISABLE_IPV6] = xcnf->disable_ipv6; >+ array[DEVCONF_ACCEPT_DAD] = xcnf->accept_dad; >+ } > } > > /* Maximum length of ifinfomsg attributes */ >@@ -3430,6 +3481,8 @@ > struct rtattr *subattr; > __u32 mtu = dev->mtu; > struct ifla_cacheinfo ci; >+ struct net_device_extended *ext = (dev == NULL) ? NULL : dev_extended(dev); >+ struct ipv6_devconf_extensions *xcnf = (ext == NULL) ? NULL : &ext->ipv6_devconf_ext; > > nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*r), flags); > r = NLMSG_DATA(nlh); >@@ -3467,7 +3520,7 @@ > /* return the device sysctl params */ > if ((array = kmalloc(DEVCONF_MAX * sizeof(*array), GFP_ATOMIC)) == NULL) > goto rtattr_failure; >- ipv6_store_devconf(&idev->cnf, array, DEVCONF_MAX * sizeof(*array)); >+ ipv6_store_devconf(&idev->cnf, xcnf, array, DEVCONF_MAX * sizeof(*array)); > RTA_PUT(skb, IFLA_INET6_CONF, DEVCONF_MAX * sizeof(*array), array); > > /* XXX - Statistics/MC not implemented */ >@@ -3835,6 +3888,22 @@ > .mode = 0644, > .proc_handler = &proc_dointvec, > }, >+ { >+ .ctl_name = NET_IPV6_DISABLE, >+ .procname = "disable_ipv6", >+ .data = &ipv6_devconf_extensions.disable_ipv6, >+ .maxlen = sizeof(int), >+ .mode = 0644, >+ .proc_handler = &proc_dointvec, >+ }, >+ { >+ .ctl_name = NET_IPV6_ACCEPT_DAD, >+ .procname = "accept_dad", >+ .data = &ipv6_devconf_extensions.accept_dad, >+ .maxlen = sizeof(int), >+ .mode = 0644, >+ .proc_handler = &proc_dointvec, >+ }, > #ifdef CONFIG_IPV6_PRIVACY > { > .ctl_name = NET_IPV6_USE_TEMPADDR, >@@ -3985,6 +4054,8 @@ > int i; > struct net_device *dev = idev ? idev->dev : NULL; > struct addrconf_sysctl_table *t; >+ struct net_device_extended *ext; >+ struct ipv6_devconf_extensions *dext; > char *dev_name = NULL; > > t = kmalloc(sizeof(*t), GFP_KERNEL); >@@ -3992,9 +4063,44 @@ > return; > memcpy(t, &addrconf_sysctl, sizeof(*t)); > for (i=0; t->addrconf_vars[i].data; i++) { >- t->addrconf_vars[i].data += (char*)p - (char*)&ipv6_devconf; >- t->addrconf_vars[i].de = NULL; >- t->addrconf_vars[i].extra1 = idev; /* embedded; no ref */ >+ if (t->addrconf_vars[i].ctl_name <= NET_IPV6_SYSCTL_EXTENDED_BOUNDARY) { >+ t->addrconf_vars[i].data += (char*)p - (char*)&ipv6_devconf; >+ t->addrconf_vars[i].de = NULL; >+ t->addrconf_vars[i].extra1 = idev; /* embedded; no ref */ >+ } else { >+ ext = (dev == NULL) ? NULL : dev_extended(dev); >+ if (ext == NULL) { >+ dext = &ipv6_devconf_extensions_dflt; >+ if (p != &ipv6_devconf_dflt) >+ /* >+ * We're registering an interface here that >+ * doesn't have an extended segment, so we >+ * register the extra sysctls, but we give them >+ * no permissions so that we can't write to them >+ */ >+ t->addrconf_vars[i].mode = 0000; >+ } else >+ dext = &ext->ipv6_devconf_ext; >+ >+ if (dext == NULL) >+ continue; >+ /* >+ * Common settings for the extensions >+ */ >+ t->addrconf_vars[i].de = NULL; >+ t->addrconf_vars[i].extra1 = idev; >+ switch (t->addrconf_vars[i].ctl_name) { >+ case NET_IPV6_DISABLE: >+ t->addrconf_vars[i].data = &dext->disable_ipv6; >+ break; >+ case NET_IPV6_ACCEPT_DAD: >+ t->addrconf_vars[i].data = &dext->accept_dad; >+ break; >+ default: >+ BUG(); >+ } >+ } >+ > } > if (dev) { > dev_name = dev->name;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 458270
:
315397
|
315538
|
315911
| 316111