Эх сурвалжийг харах

[IPV6]: Implement appropriate dummy rule 4 in ipv6_dev_get_saddr().

Ensure to update hiscore.rule in dummy rule 4 in ipv6_dev_get_saddr().
Pointed out by Yan Zheng <yanzheng@21cn.com>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki 19 жил өмнө
parent
commit
220bbd7483
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      net/ipv6/addrconf.c

+ 2 - 0
net/ipv6/addrconf.c

@@ -985,6 +985,8 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev,
 			}
 
 			/* Rule 4: Prefer home address -- not implemented yet */
+			if (hiscore.rule < 4)
+				hiscore.rule++;
 
 			/* Rule 5: Prefer outgoing interface */
 			if (hiscore.rule < 5) {