Lines Matching full:bind

24 #include "bind.h"
138 * @bind: the binding related to the destination peer
145 static int ovpn_udp4_output(struct ovpn_peer *peer, struct ovpn_bind *bind, in ovpn_udp4_output() argument
151 .saddr = bind->local.ipv4.s_addr, in ovpn_udp4_output()
152 .daddr = bind->remote.in4.sin_addr.s_addr, in ovpn_udp4_output()
154 .fl4_dport = bind->remote.in4.sin_port, in ovpn_udp4_output()
173 bind->local.ipv4.s_addr = 0; in ovpn_udp4_output()
182 bind->local.ipv4.s_addr = 0; in ovpn_udp4_output()
193 &bind->remote.in4, in ovpn_udp4_output()
213 * @bind: the binding related to the destination peer
220 static int ovpn_udp6_output(struct ovpn_peer *peer, struct ovpn_bind *bind, in ovpn_udp6_output() argument
228 .saddr = bind->local.ipv6, in ovpn_udp6_output()
229 .daddr = bind->remote.in6.sin6_addr, in ovpn_udp6_output()
231 .fl6_dport = bind->remote.in6.sin6_port, in ovpn_udp6_output()
234 .flowi6_oif = bind->remote.in6.sin6_scope_id, in ovpn_udp6_output()
249 bind->local.ipv6 = in6addr_any; in ovpn_udp6_output()
259 &bind->remote.in6, ret); in ovpn_udp6_output()
300 struct ovpn_bind *bind; in ovpn_udp_output() local
308 bind = rcu_dereference(peer->bind); in ovpn_udp_output()
309 if (unlikely(!bind)) { in ovpn_udp_output()
310 net_warn_ratelimited("%s: no bind for remote peer %u\n", in ovpn_udp_output()
316 switch (bind->remote.in4.sin_family) { in ovpn_udp_output()
318 ret = ovpn_udp4_output(peer, bind, cache, sk, skb); in ovpn_udp_output()
322 ret = ovpn_udp6_output(peer, bind, cache, sk, skb); in ovpn_udp_output()