aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/addrconf.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 542d09561ed6..27fedc3e4449 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2528,7 +2528,7 @@ static void sit_add_v4_addrs(struct inet6_dev *idev)
2528 struct in6_addr addr; 2528 struct in6_addr addr;
2529 struct net_device *dev; 2529 struct net_device *dev;
2530 struct net *net = dev_net(idev->dev); 2530 struct net *net = dev_net(idev->dev);
2531 int scope; 2531 int scope, plen;
2532 2532
2533 ASSERT_RTNL(); 2533 ASSERT_RTNL();
2534 2534
@@ -2538,12 +2538,14 @@ static void sit_add_v4_addrs(struct inet6_dev *idev)
2538 if (idev->dev->flags&IFF_POINTOPOINT) { 2538 if (idev->dev->flags&IFF_POINTOPOINT) {
2539 addr.s6_addr32[0] = htonl(0xfe800000); 2539 addr.s6_addr32[0] = htonl(0xfe800000);
2540 scope = IFA_LINK; 2540 scope = IFA_LINK;
2541 plen = 64;
2541 } else { 2542 } else {
2542 scope = IPV6_ADDR_COMPATv4; 2543 scope = IPV6_ADDR_COMPATv4;
2544 plen = 96;
2543 } 2545 }
2544 2546
2545 if (addr.s6_addr32[3]) { 2547 if (addr.s6_addr32[3]) {
2546 add_addr(idev, &addr, 128, scope); 2548 add_addr(idev, &addr, plen, scope);
2547 return; 2549 return;
2548 } 2550 }
2549 2551
@@ -2555,7 +2557,6 @@ static void sit_add_v4_addrs(struct inet6_dev *idev)
2555 int flag = scope; 2557 int flag = scope;
2556 2558
2557 for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) { 2559 for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
2558 int plen;
2559 2560
2560 addr.s6_addr32[3] = ifa->ifa_local; 2561 addr.s6_addr32[3] = ifa->ifa_local;
2561 2562
@@ -2566,10 +2567,6 @@ static void sit_add_v4_addrs(struct inet6_dev *idev)
2566 continue; 2567 continue;
2567 flag |= IFA_HOST; 2568 flag |= IFA_HOST;
2568 } 2569 }
2569 if (idev->dev->flags&IFF_POINTOPOINT)
2570 plen = 64;
2571 else
2572 plen = 96;
2573 2570
2574 add_addr(idev, &addr, plen, flag); 2571 add_addr(idev, &addr, plen, flag);
2575 } 2572 }