summaryrefslogtreecommitdiff
path: root/proto/bfd
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2014-05-18 11:42:26 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2014-05-18 11:42:26 +0200
commit05476c4d04a24bdb26fa64e05ab31bc36118f34e (patch)
treee775f059cfb4bb027c444bb53eb9356e643082c8 /proto/bfd
parent1149aa977d906a6400f998d5f6600871584395d0 (diff)
IPv4/IPv6 integrated socket code.
Diffstat (limited to 'proto/bfd')
-rw-r--r--proto/bfd/packets.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/proto/bfd/packets.c b/proto/bfd/packets.c
index 964172d8..49b69bed 100644
--- a/proto/bfd/packets.c
+++ b/proto/bfd/packets.c
@@ -101,8 +101,8 @@ bfd_rx_hook(sock *sk, int len)
uint err_val = 0;
char fb[8];
- if ((sk->sport == BFD_CONTROL_PORT) && (sk->ttl < 255))
- DROP("wrong TTL", sk->ttl);
+ if ((sk->sport == BFD_CONTROL_PORT) && (sk->rcv_ttl < 255))
+ DROP("wrong TTL", sk->rcv_ttl);
if (len < BFD_BASE_LEN)
DROP("too short", len);
@@ -209,6 +209,7 @@ bfd_open_rx_sk(struct bfd_proto *p, int multihop)
return sk;
err:
+ sk_log_error(sk, p->p.name);
rfree(sk);
return NULL;
}
@@ -243,6 +244,7 @@ bfd_open_tx_sk(struct bfd_proto *p, ip_addr local, struct iface *ifa)
return sk;
err:
+ sk_log_error(sk, p->p.name);
rfree(sk);
return NULL;
}