Lines Matching defs:bind
23 #include "bind.h"
137 * @bind: the binding related to the destination peer
144 static int ovpn_udp4_output(struct ovpn_peer *peer, struct ovpn_bind *bind,
150 .saddr = bind->local.ipv4.s_addr,
151 .daddr = bind->remote.in4.sin_addr.s_addr,
153 .fl4_dport = bind->remote.in4.sin_port,
172 bind->local.ipv4.s_addr = 0;
181 bind->local.ipv4.s_addr = 0;
192 &bind->remote.in4,
212 * @bind: the binding related to the destination peer
219 static int ovpn_udp6_output(struct ovpn_peer *peer, struct ovpn_bind *bind,
227 .saddr = bind->local.ipv6,
228 .daddr = bind->remote.in6.sin6_addr,
230 .fl6_dport = bind->remote.in6.sin6_port,
233 .flowi6_oif = bind->remote.in6.sin6_scope_id,
248 bind->local.ipv6 = in6addr_any;
258 &bind->remote.in6, ret);
299 struct ovpn_bind *bind;
307 bind = rcu_dereference(peer->bind);
308 if (unlikely(!bind)) {
309 net_warn_ratelimited("%s: no bind for remote peer %u\n",
315 switch (bind->remote.in4.sin_family) {
317 ret = ovpn_udp4_output(peer, bind, cache, sk, skb);
321 ret = ovpn_udp6_output(peer, bind, cache, sk, skb);