mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
'addrlen' does not matter when we need to find the first non-zero bit in
the byte from the left and 'addrlen' already counted in 'lim'. PR: 212121 Submitted by: Herbie.Robinson@stratus.com MFC after: 7 days
This commit is contained in:
parent
bce38b9f35
commit
e1ec67bbc9
2 changed files with 2 additions and 2 deletions
|
|
@ -949,7 +949,7 @@ matchlen(struct sockaddr *src, struct sockaddr *dst)
|
|||
|
||||
while (s < lim)
|
||||
if ((r = (*d++ ^ *s++)) != 0) {
|
||||
while (r < addrlen * 8) {
|
||||
while ((r & 0x80) == 0) {
|
||||
match++;
|
||||
r <<= 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -930,7 +930,7 @@ matchlen(struct sockaddr *src, struct sockaddr *dst)
|
|||
|
||||
while (s < lim)
|
||||
if ((r = (*d++ ^ *s++)) != 0) {
|
||||
while (r < addrlen * 8) {
|
||||
while ((r & 0x80) == 0) {
|
||||
match++;
|
||||
r <<= 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue