diff options
Diffstat (limited to 'proto')
-rw-r--r-- | proto/babel/packets.c | 1 | ||||
-rw-r--r-- | proto/bgp/bgp.c | 2 | ||||
-rw-r--r-- | proto/ospf/iface.c | 2 | ||||
-rw-r--r-- | proto/radv/packets.c | 1 | ||||
-rw-r--r-- | proto/radv/radv.c | 1 | ||||
-rw-r--r-- | proto/rip/packets.c | 1 |
6 files changed, 7 insertions, 1 deletions
diff --git a/proto/babel/packets.c b/proto/babel/packets.c index 4abcf7e4..5b356fae 100644 --- a/proto/babel/packets.c +++ b/proto/babel/packets.c @@ -1332,6 +1332,7 @@ babel_open_socket(struct babel_iface *ifa) sk->dport = ifa->cf->port; sk->iface = ifa->iface; sk->saddr = ifa->addr; + sk->vrf = p->p.vrf; sk->rx_hook = babel_rx_hook; sk->tx_hook = babel_tx_hook; diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index f4791215..b0814791 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -939,6 +939,7 @@ bgp_connect(struct bgp_proto *p) /* Enter Connect state and start establishing c s->daddr = p->cf->remote_ip; s->dport = p->cf->remote_port; s->iface = p->neigh ? p->neigh->iface : NULL; + s->vrf = p->p.vrf; s->ttl = p->cf->ttl_security ? 255 : hops; s->rbsize = p->cf->enable_extended_messages ? BGP_RX_BUFFER_EXT_SIZE : BGP_RX_BUFFER_SIZE; s->tbsize = p->cf->enable_extended_messages ? BGP_TX_BUFFER_EXT_SIZE : BGP_TX_BUFFER_SIZE; @@ -1331,6 +1332,7 @@ bgp_start(struct proto *P) lock->addr = p->cf->remote_ip; lock->port = p->cf->remote_port; lock->iface = p->cf->iface; + lock->vrf = p->cf->iface ? NULL : p->p.vrf; lock->type = OBJLOCK_TCP; lock->hook = bgp_start_locked; lock->data = p; diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index 29d21a07..e3d8d61b 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -121,6 +121,7 @@ ospf_sk_open(struct ospf_iface *ifa) sk->dport = OSPF_PROTO; sk->saddr = ifa->addr->ip; sk->iface = ifa->iface; + sk->vrf = p->p.vrf; sk->tos = ifa->cf->tx_tos; sk->priority = ifa->cf->tx_priority; @@ -204,6 +205,7 @@ ospf_open_vlink_sk(struct ospf_proto *p) sk->type = SK_IP; sk->subtype = ospf_is_v2(p) ? SK_IPV4 : SK_IPV6; sk->dport = OSPF_PROTO; + sk->vrf = p->p.vrf; /* FIXME: configurable tos/priority ? */ sk->tos = IP_PREC_INTERNET_CONTROL; diff --git a/proto/radv/packets.c b/proto/radv/packets.c index e07296e1..7c148b7d 100644 --- a/proto/radv/packets.c +++ b/proto/radv/packets.c @@ -387,6 +387,7 @@ radv_sk_open(struct radv_iface *ifa) sk->subtype = SK_IPV6; sk->dport = ICMPV6_PROTO; sk->saddr = ifa->addr->ip; + sk->vrf = ifa->ra->p.vrf; sk->ttl = 255; /* Mandatory for Neighbor Discovery packets */ sk->rx_hook = radv_rx_hook; diff --git a/proto/radv/radv.c b/proto/radv/radv.c index c96d7724..e9140115 100644 --- a/proto/radv/radv.c +++ b/proto/radv/radv.c @@ -297,7 +297,6 @@ radv_iface_new(struct radv_proto *p, struct iface *iface, struct radv_iface_conf ifa->timer = tm_new_init(pool, radv_timer, ifa, 0, 0); struct object_lock *lock = olock_new(pool); - lock->addr = IPA_NONE; lock->type = OBJLOCK_IP; lock->port = ICMPV6_PROTO; lock->iface = iface; diff --git a/proto/rip/packets.c b/proto/rip/packets.c index 4925ca36..891f454f 100644 --- a/proto/rip/packets.c +++ b/proto/rip/packets.c @@ -747,6 +747,7 @@ rip_open_socket(struct rip_iface *ifa) sk->dport = ifa->cf->port; sk->iface = ifa->iface; sk->saddr = rip_is_v2(p) ? ifa->iface->addr4->ip : ifa->iface->llv6->ip; + sk->vrf = p->p.vrf; sk->rx_hook = rip_rx_hook; sk->tx_hook = rip_tx_hook; |