summaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index c6bd0f7a020a..c5ebfa199794 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -62,6 +62,11 @@
62#include <net/net_namespace.h> 62#include <net/net_namespace.h>
63#include <net/addrconf.h> 63#include <net/addrconf.h>
64 64
65#define IPV6ONLY_FLAGS \
66 (IFA_F_NODAD | IFA_F_OPTIMISTIC | IFA_F_DADFAILED | \
67 IFA_F_HOMEADDRESS | IFA_F_TENTATIVE | \
68 IFA_F_MANAGETEMPADDR | IFA_F_STABLE_PRIVACY)
69
65static struct ipv4_devconf ipv4_devconf = { 70static struct ipv4_devconf ipv4_devconf = {
66 .data = { 71 .data = {
67 [IPV4_DEVCONF_ACCEPT_REDIRECTS - 1] = 1, 72 [IPV4_DEVCONF_ACCEPT_REDIRECTS - 1] = 1,
@@ -468,6 +473,9 @@ static int __inet_insert_ifa(struct in_ifaddr *ifa, struct nlmsghdr *nlh,
468 ifa->ifa_flags &= ~IFA_F_SECONDARY; 473 ifa->ifa_flags &= ~IFA_F_SECONDARY;
469 last_primary = &in_dev->ifa_list; 474 last_primary = &in_dev->ifa_list;
470 475
476 /* Don't set IPv6 only flags to IPv4 addresses */
477 ifa->ifa_flags &= ~IPV6ONLY_FLAGS;
478
471 for (ifap = &in_dev->ifa_list; (ifa1 = *ifap) != NULL; 479 for (ifap = &in_dev->ifa_list; (ifa1 = *ifap) != NULL;
472 ifap = &ifa1->ifa_next) { 480 ifap = &ifa1->ifa_next) {
473 if (!(ifa1->ifa_flags & IFA_F_SECONDARY) && 481 if (!(ifa1->ifa_flags & IFA_F_SECONDARY) &&