summaryrefslogtreecommitdiff
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-07-11 13:50:44 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2013-07-11 13:50:44 +0200
commit354496ace87341428e6005fbc073fbe57b4e6c0e (patch)
tree3dae3a53b6e45cd7cb144296d54fda90fff7cc14 /proto/ospf
parentcc31b75a8fd7949533c12db2c3e9d67eeaf46d10 (diff)
Some fixes for TTL security.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/iface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c
index 698ef620..63c26466 100644
--- a/proto/ospf/iface.c
+++ b/proto/ospf/iface.c
@@ -87,6 +87,7 @@ ospf_sk_open(struct ospf_iface *ifa)
sk->tbsize = rxbufsize(ifa);
sk->data = (void *) ifa;
sk->flags = SKF_LADDR_RX | (ifa->check_ttl ? SKF_TTL_RX : 0);
+ sk->ttl = ifa->cf->ttl_security ? 255 : -1;
if (sk_open(sk) != 0)
goto err;
@@ -664,7 +665,8 @@ ospf_iface_reconfigure(struct ospf_iface *ifa, struct ospf_iface_patt *new)
/* Change of these options would require to reset the iface socket */
if ((new->real_bcast != ifa->cf->real_bcast) ||
(new->tx_tos != ifa->cf->tx_tos) ||
- (new->tx_priority != ifa->cf->tx_priority))
+ (new->tx_priority != ifa->cf->tx_priority) ||
+ (new->ttl_security != ifa->cf->ttl_security))
return 0;
ifa->cf = new;