kernel-pfroute: Fix mixed up memset() call in get_route()
The retry code introduced in dc8b083 got the memset() arguments wrong.
Fix this to ensure the buffer gets zeroed, for real.
It probably doesn't matter as we do reset the message length on retry, so
the stale data shouldn't be seen by anyone.
Found-by: git grep 'memset\s*\([^,]*,\s*[^,]*,\s*0\s*\)'
This commit is contained in:
committed by
Tobias Brunner
parent
b656f63efe
commit
45b80880f8
@@ -1568,7 +1568,7 @@ retry:
|
||||
src = NULL;
|
||||
msg.hdr.rtm_seq = ref_get(&this->seq);
|
||||
msg.hdr.rtm_addrs = 0;
|
||||
memset(msg.buf, sizeof(msg.buf), 0);
|
||||
memset(msg.buf, 0, sizeof(msg.buf));
|
||||
goto retry;
|
||||
}
|
||||
DBG1(DBG_KNL, "PF_ROUTE lookup failed: %s", strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user