summaryrefslogtreecommitdiff
path: root/proto/ospf/iface.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-05-17 15:21:49 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-05-17 15:21:49 +0200
commit08b3a24da5bbd1bab09d6a2400cdf7705d5e18a7 (patch)
tree41335bdccfca47f09d4aaa3da01038068714af84 /proto/ospf/iface.c
parent5af7b59660be615fbbd7c20b92b71321c003c43a (diff)
IO: Minor changes in socket AF handing
AF can be specified implicitly by saddr or daddr, flags SKF_V4ONLY and SKF_V6ONLY are to be removed.
Diffstat (limited to 'proto/ospf/iface.c')
-rw-r--r--proto/ospf/iface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c
index 4548f6da..6ef24ffe 100644
--- a/proto/ospf/iface.c
+++ b/proto/ospf/iface.c
@@ -108,10 +108,10 @@ ospf_sk_open(struct ospf_iface *ifa)
sock *sk = sk_new(ifa->pool);
sk->type = SK_IP;
+ sk->subtype = ospf_is_v2(p) ? SK_IPV4 : SK_IPV6;
sk->dport = OSPF_PROTO;
sk->saddr = ifa->addr->ip;
sk->iface = ifa->iface;
- sk->fam = ospf_is_v2(p) ? SK_FAM_IPV4 : SK_FAM_IPV6;
sk->tos = ifa->cf->tx_tos;
sk->priority = ifa->cf->tx_priority;
@@ -193,8 +193,8 @@ ospf_open_vlink_sk(struct ospf_proto *p)
{
sock *sk = sk_new(p->p.pool);
sk->type = SK_IP;
+ sk->subtype = ospf_is_v2(p) ? SK_IPV4 : SK_IPV6;
sk->dport = OSPF_PROTO;
- sk->fam = ospf_is_v2(p) ? SK_FAM_IPV4 : SK_FAM_IPV6;
/* FIXME: configurable tos/priority ? */
sk->tos = IP_PREC_INTERNET_CONTROL;