BSD: Fix invalid pointer derefence in logging code
For logging purposes a stack allocated net_addr struct was passed by value as vararg (instead of the expected pointer). This resulted in a segfault when the specific error condition got logged.
This commit is contained in:
parent
9c41e1ca3e
commit
a7c9515ebc
1 changed files with 1 additions and 1 deletions
|
@ -453,7 +453,7 @@ krt_read_route(struct ks_msg *msg, struct krt_proto *p, int scan)
|
||||||
net_fill_ip4(&ndst, ipa_to_ip4(idst), pxlen);
|
net_fill_ip4(&ndst, ipa_to_ip4(idst), pxlen);
|
||||||
|
|
||||||
if ((flags & RTF_GATEWAY) && ipa_zero(igate))
|
if ((flags & RTF_GATEWAY) && ipa_zero(igate))
|
||||||
{ log(L_ERR "%s (%N) - missing gateway", errmsg, ndst); return; }
|
{ log(L_ERR "%s (%N) - missing gateway", errmsg, &ndst); return; }
|
||||||
|
|
||||||
u32 self_mask = RTF_PROTO1;
|
u32 self_mask = RTF_PROTO1;
|
||||||
u32 alien_mask = RTF_STATIC | RTF_PROTO1 | RTF_GATEWAY;
|
u32 alien_mask = RTF_STATIC | RTF_PROTO1 | RTF_GATEWAY;
|
||||||
|
|
Loading…
Reference in a new issue