summaryrefslogtreecommitdiffstats
path: root/sysdep/bsd
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-04-02 11:31:20 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-04-02 11:31:20 +0200
commitbed417288e989c48a1362bb1177f436a2e2f9f4f (patch)
tree3fb727a0e2b0be0cfecef14f30b57134eeb3348b /sysdep/bsd
parent126683feeda03ffb5a4ce23611e59a4598382d49 (diff)
downloadbird-bed417288e989c48a1362bb1177f436a2e2f9f4f.tar
bird-bed417288e989c48a1362bb1177f436a2e2f9f4f.zip
Minor fixes to previous patches.
Diffstat (limited to 'sysdep/bsd')
-rw-r--r--sysdep/bsd/sysio.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sysdep/bsd/sysio.h b/sysdep/bsd/sysio.h
index 9ee4ade..87c78fb 100644
--- a/sysdep/bsd/sysio.h
+++ b/sysdep/bsd/sysio.h
@@ -150,18 +150,18 @@ sysio_process_rx_cmsgs(sock *s, struct msghdr *msg)
// log(L_WARN "RX %I %d", s->laddr, s->lifindex);
}
-
-void
-sysio_prepare_tx_cmsgs(sock *s, struct msghdr *msg)
+/* Unfortunately, IP_SENDSRCADDR does not work for raw IP sockets on BSD kernels */
+static void
+sysio_prepare_tx_cmsgs(sock *s, struct msghdr *msg, void *cbuf, size_t cbuflen)
{
struct cmsghdr *cm;
struct in_addr *sa;
if (!(s->flags & SKF_LADDR_TX))
- {
- msg->msg_controllen = 0;
- return;
- }
+ return;
+
+ msg->msg_control = cbuf;
+ msg->msg_controllen = cbuflen;
if (s->iface)
{