diff options
| author | Michael Brown | 2022-09-06 14:02:17 +0200 |
|---|---|---|
| committer | Michael Brown | 2022-09-06 14:04:19 +0200 |
| commit | bc19aeca5f6c695ad3db0196057d155e4f64584e (patch) | |
| tree | 6b9ef11f7b57fce16818f0fd7b1f43ae05ff7057 /src/net | |
| parent | [test] Validate constructed IPv6 routing table entries (diff) | |
| download | ipxe-bc19aeca5f6c695ad3db0196057d155e4f64584e.tar.gz ipxe-bc19aeca5f6c695ad3db0196057d155e4f64584e.tar.xz ipxe-bc19aeca5f6c695ad3db0196057d155e4f64584e.zip | |
[ipv6] Fix mask calculation when prefix length is not a multiple of 8
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net')
| -rw-r--r-- | src/net/ipv6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/ipv6.c b/src/net/ipv6.c index 4b2c33eb4..901203c40 100644 --- a/src/net/ipv6.c +++ b/src/net/ipv6.c @@ -251,7 +251,7 @@ int ipv6_add_miniroute ( struct net_device *netdev, struct in6_addr *address, *prefix_mask = 0xff; } if ( remaining ) - *prefix_mask <<= ( 8 - remaining ); + *prefix_mask = ( 0xff << ( 8 - remaining ) ); } /* Add to start of routing table */ |
