瀏覽代碼

[IPV6]: Fix fallout from CONFIG_IPV6_PRIVACY

Trying to build today's 2.6.14+git snapshot gives undefined references
to use_tempaddr

Looks like an ifdef got left out.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Peter Chubb 19 年之前
父節點
當前提交
44fd0261d3
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      net/ipv6/addrconf.c

+ 2 - 1
net/ipv6/addrconf.c

@@ -1022,6 +1022,7 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev,
 					continue;
 					continue;
 			}
 			}
 
 
+#ifdef CONFIG_IPV6_PRIVACY
 			/* Rule 7: Prefer public address
 			/* Rule 7: Prefer public address
 			 * Note: prefer temprary address if use_tempaddr >= 2
 			 * Note: prefer temprary address if use_tempaddr >= 2
 			 */
 			 */
@@ -1042,7 +1043,7 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev,
 				if (hiscore.attrs & IPV6_SADDR_SCORE_PRIVACY)
 				if (hiscore.attrs & IPV6_SADDR_SCORE_PRIVACY)
 					continue;
 					continue;
 			}
 			}
-
+#endif
 			/* Rule 8: Use longest matching prefix */
 			/* Rule 8: Use longest matching prefix */
 			if (hiscore.rule < 8)
 			if (hiscore.rule < 8)
 				hiscore.matchlen = ipv6_addr_diff(&ifa_result->addr, daddr);
 				hiscore.matchlen = ipv6_addr_diff(&ifa_result->addr, daddr);