mirror of
https://github.com/adulau/aha.git
synced 2024-12-31 21:26:18 +00:00
ipv6 sit: Set relay to 0.0.0.0 directly if relay_prefixlen == 0.
ipv6 sit: Set relay to 0.0.0.0 directly if relay_prefixlen == 0. Do not use bit-shift if relay_prefixlen == 0; relay_prefix << 32 does not result in 0. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e7db38c38f
commit
91b2a3f9bb
1 changed files with 6 additions and 3 deletions
|
@ -1014,9 +1014,12 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||||
ip6rd.prefixlen);
|
ip6rd.prefixlen);
|
||||||
if (!ipv6_addr_equal(&prefix, &ip6rd.prefix))
|
if (!ipv6_addr_equal(&prefix, &ip6rd.prefix))
|
||||||
goto done;
|
goto done;
|
||||||
|
if (ip6rd.relay_prefixlen)
|
||||||
relay_prefix = ip6rd.relay_prefix &
|
relay_prefix = ip6rd.relay_prefix &
|
||||||
htonl(0xffffffffUL <<
|
htonl(0xffffffffUL <<
|
||||||
(32 - ip6rd.relay_prefixlen));
|
(32 - ip6rd.relay_prefixlen));
|
||||||
|
else
|
||||||
|
relay_prefix = 0;
|
||||||
if (relay_prefix != ip6rd.relay_prefix)
|
if (relay_prefix != ip6rd.relay_prefix)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue