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 315538 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 version of above patch
linux-kernel-test.patch (text/plain), 12.39 KB, created by
Neil Horman
on 2008-09-02 11:47:55 UTC
(
hide
)
Description:
new version of above patch
Filename:
MIME Type:
Creator:
Neil Horman
Created:
2008-09-02 11:47:55 UTC
Size:
12.39 KB
patch
obsolete
>diff -up linux-2.6.18.noarch/include/linux/sysctl.h.orig linux-2.6.18.noarch/include/linux/sysctl.h >--- linux-2.6.18.noarch/include/linux/sysctl.h.orig 2008-09-02 07:07:53.000000000 -0400 >+++ linux-2.6.18.noarch/include/linux/sysctl.h 2008-09-02 07:09:01.000000000 -0400 >@@ -577,6 +577,9 @@ enum { > 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 > }; > >diff -up linux-2.6.18.noarch/include/linux/if.h.orig linux-2.6.18.noarch/include/linux/if.h >--- linux-2.6.18.noarch/include/linux/if.h.orig 2008-09-02 07:06:34.000000000 -0400 >+++ linux-2.6.18.noarch/include/linux/if.h 2008-09-02 07:09:01.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 >diff -up linux-2.6.18.noarch/include/linux/ipv6.h.orig linux-2.6.18.noarch/include/linux/ipv6.h >--- linux-2.6.18.noarch/include/linux/ipv6.h.orig 2008-09-02 07:07:08.000000000 -0400 >+++ linux-2.6.18.noarch/include/linux/ipv6.h 2008-09-02 07:09:01.000000000 -0400 >@@ -182,6 +182,8 @@ enum { > DEVCONF_ACCEPT_RA_RTR_PREF, > DEVCONF_RTR_PROBE_INTERVAL, > DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN, >+ DEVCONF_DISABLE_IPV6, >+ DEVCONF_ACCEPT_DAD, > DEVCONF_MAX > }; > >diff -up linux-2.6.18.noarch/include/linux/netdevice.h.orig linux-2.6.18.noarch/include/linux/netdevice.h >--- linux-2.6.18.noarch/include/linux/netdevice.h.orig 2008-09-02 07:07:15.000000000 -0400 >+++ linux-2.6.18.noarch/include/linux/netdevice.h 2008-09-02 07:09:01.000000000 -0400 >@@ -535,6 +535,23 @@ struct net_device > 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 @@ static inline void *netdev_priv(struct n > & ~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. >diff -up linux-2.6.18.noarch/net/core/dev.c.orig linux-2.6.18.noarch/net/core/dev.c >--- linux-2.6.18.noarch/net/core/dev.c.orig 2008-09-02 07:07:20.000000000 -0400 >+++ linux-2.6.18.noarch/net/core/dev.c 2008-09-02 07:44:57.000000000 -0400 >@@ -3257,7 +3257,8 @@ struct net_device *alloc_netdev(int size > > /* 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 @@ struct net_device *alloc_netdev(int size > > setup(dev); > strcpy(dev->name, name); >+ dev->priv_flags |= IFF_EXTENDED; >+ dev->priv_len = sizeof_priv; > return dev; > } > EXPORT_SYMBOL(alloc_netdev); >diff -up linux-2.6.18.noarch/net/ipv6/ip6_input.c.orig linux-2.6.18.noarch/net/ipv6/ip6_input.c >--- linux-2.6.18.noarch/net/ipv6/ip6_input.c.orig 2008-09-02 07:07:17.000000000 -0400 >+++ linux-2.6.18.noarch/net/ipv6/ip6_input.c 2008-09-02 07:09:01.000000000 -0400 >@@ -61,6 +61,7 @@ int ipv6_rcv(struct sk_buff *skb, struct > 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 @@ int ipv6_rcv(struct sk_buff *skb, struct > > 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; >diff -up linux-2.6.18.noarch/net/ipv6/ip6_output.c.orig linux-2.6.18.noarch/net/ipv6/ip6_output.c >--- linux-2.6.18.noarch/net/ipv6/ip6_output.c.orig 2008-09-02 07:07:42.000000000 -0400 >+++ linux-2.6.18.noarch/net/ipv6/ip6_output.c 2008-09-02 07:09:01.000000000 -0400 >@@ -149,6 +149,15 @@ static int ip6_output2(struct sk_buff *s > > 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); >diff -up linux-2.6.18.noarch/net/ipv6/addrconf.c.orig linux-2.6.18.noarch/net/ipv6/addrconf.c >--- linux-2.6.18.noarch/net/ipv6/addrconf.c.orig 2008-09-02 07:07:50.000000000 -0400 >+++ linux-2.6.18.noarch/net/ipv6/addrconf.c 2008-09-02 07:09:01.000000000 -0400 >@@ -131,6 +131,7 @@ static void addrconf_leave_anycast(struc > > 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 @@ struct ipv6_devconf ipv6_devconf = { > #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 @@ static struct ipv6_devconf ipv6_devconf_ > #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 @@ static struct inet6_dev * ipv6_add_dev(s > { > struct inet6_dev *ndev; > struct in6_addr maddr; >+ struct net_device_extended *ext = dev_extended(dev); > > ASSERT_RTNL(); > >@@ -361,6 +373,9 @@ static struct inet6_dev * ipv6_add_dev(s > 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 +411,9 @@ static struct inet6_dev * ipv6_add_dev(s > */ > 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 +1357,25 @@ static void addrconf_dad_stop(struct ine > > 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 +2660,21 @@ static void addrconf_dad_timer(unsigned > 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 +3420,7 @@ static void inet6_ifa_notify(int event, > 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 +3452,10 @@ static void inline ipv6_store_devconf(st > 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 +3480,8 @@ static int inet6_fill_ifinfo(struct sk_b > 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 +3519,7 @@ static int inet6_fill_ifinfo(struct sk_b > /* 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 +3887,22 @@ static struct addrconf_sysctl_table > .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 +4053,8 @@ static void addrconf_sysctl_register(str > 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 +4062,29 @@ static void addrconf_sysctl_register(str > 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 (i <= 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) >+ if (p == &ipv6_devconf_dflt) >+ dext = &ipv6_devconf_extensions_dflt; >+ else >+ continue; >+ else >+ dext = &ext->ipv6_devconf_ext; >+ >+ /* >+ * Common settings for the extensions >+ */ >+ t->addrconf_vars[i].de = NULL; >+ t->addrconf_vars[i].extra1 = idev; >+ t->addrconf_vars[i].data += >+ (char *)dext - (char *)&ipv6_devconf_extensions; >+ } >+ > } > 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