summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-10-16 12:07:45 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-10-16 12:07:45 +0200
commit4c188ac86175422bc44e88e037b01acaba781cb7 (patch)
treeed56ddc029eb0153dccc3aa73e597bfe7be0421c /src
parentecebe8a755251375b18ede7afc8e684ad1be0bf8 (diff)
downloadfastd-4c188ac86175422bc44e88e037b01acaba781cb7.tar
fastd-4c188ac86175422bc44e88e037b01acaba781cb7.zip
Fix fast roaming when local IP address has changed
Diffstat (limited to 'src')
-rw-r--r--src/send.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/send.c b/src/send.c
index 3de2e12..0b3f59c 100644
--- a/src/send.c
+++ b/src/send.c
@@ -122,6 +122,16 @@ static void send_type(fastd_context_t *ctx, const fastd_socket_t *sock, const fa
ret = sendmsg(sock->fd, &msg, 0);
} while (ret < 0 && errno == EINTR);
+ if (ret < 0 && errno == EINVAL && msg.msg_controllen) {
+ pr_debug2(ctx, "sendmsg failed, trying again without pktinfo");
+ msg.msg_control = NULL;
+ msg.msg_controllen = 0;
+
+ do {
+ ret = sendmsg(sock->fd, &msg, 0);
+ } while (ret < 0 && errno == EINTR);
+ }
+
if (ret < 0) {
switch (errno) {
case EAGAIN: