diff options
author | Maria Matejka <mq@ucw.cz> | 2023-04-24 10:40:53 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-04-24 10:40:53 +0200 |
commit | db2b67268c133d26c4d7971369a5515efa2f3b60 (patch) | |
tree | 799d2166bbd7f2ef0024a5b161d7b964e2d72a3b | |
parent | fa8848aca3f0473412f3ae6288d71dee8458bcfa (diff) | |
parent | d61505b039bf0aa6697e28b2a4e07907c89ba1fb (diff) |
Merge commit 'd61505b039bf0aa6697e28b2a4e07907c89ba1fb' into thread-next
-rw-r--r-- | sysdep/bsd/krt-sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 6bf756ff..42082443 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -324,7 +324,7 @@ krt_send_route(struct krt_proto *p, int cmd, const rte *e) if (ipa_is_link_local(gw)) _I0(gw) = 0xfe800000 | (i->index & 0x0000ffff); - sockaddr_fill(&gate, af, gw, NULL, 0); + sockaddr_fill(&gate, (ipa_is_ip4(gw) ? AF_INET : AF_INET6), gw, NULL, 0); msg.rtm.rtm_flags |= RTF_GATEWAY; msg.rtm.rtm_addrs |= RTA_GATEWAY; break; @@ -479,7 +479,7 @@ krt_read_route(struct ks_msg *msg, struct krt_proto *p, int scan) idst = ipa_from_sa(&dst); imask = ipa_from_sa(&mask); - igate = (gate.sa.sa_family == dst.sa.sa_family) ? ipa_from_sa(&gate) : IPA_NONE; + igate = ipa_from_sa(&gate); #ifdef KRT_SHARED_SOCKET if (!scan) |