diff options
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 137d1892395d..a4b5bd4d2c89 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 | |||
65 | static struct ipv4_devconf ipv4_devconf = { | 70 | static struct ipv4_devconf ipv4_devconf = { |
66 | .data = { | 71 | .data = { |
67 | [IPV4_DEVCONF_ACCEPT_REDIRECTS - 1] = 1, | 72 | [IPV4_DEVCONF_ACCEPT_REDIRECTS - 1] = 1, |
@@ -482,6 +487,9 @@ static int __inet_insert_ifa(struct in_ifaddr *ifa, struct nlmsghdr *nlh, | |||
482 | ifa->ifa_flags &= ~IFA_F_SECONDARY; | 487 | ifa->ifa_flags &= ~IFA_F_SECONDARY; |
483 | last_primary = &in_dev->ifa_list; | 488 | last_primary = &in_dev->ifa_list; |
484 | 489 | ||
490 | /* Don't set IPv6 only flags to IPv4 addresses */ | ||
491 | ifa->ifa_flags &= ~IPV6ONLY_FLAGS; | ||
492 | |||
485 | ifap = &in_dev->ifa_list; | 493 | ifap = &in_dev->ifa_list; |
486 | ifa1 = rtnl_dereference(*ifap); | 494 | ifa1 = rtnl_dereference(*ifap); |
487 | 495 | ||