12 #include <linux/module.h>
13 #include <linux/net.h>
15 #include <linux/udp.h>
17 #include <linux/in6.h>
18 #include <linux/icmp.h>
19 #include <linux/slab.h>
36 static void rxrpc_assess_MTU_size(
struct rxrpc_peer *peer)
44 peer->
srx.transport.sin.sin_addr.s_addr, 0,
48 _leave(
" [route err %ld]", PTR_ERR(rt));
68 peer = kzalloc(
sizeof(
struct rxrpc_peer), gfp);
71 INIT_LIST_HEAD(&peer->
link);
78 rxrpc_assess_MTU_size(peer);
109 const char *
new =
"old";
112 _enter(
"{%d,%d,%pI4+%hu}",
121 _debug(
"check PEER %d { u=%d t=%d l=%d }",
124 peer->
srx.transport_type,
125 peer->
srx.transport_len);
133 goto found_extant_peer;
139 candidate = rxrpc_alloc_peer(srx, gfp);
154 goto found_extant_second;
167 _net(
"PEER %s %d {%d,%u,%pI4+%hu}",
170 peer->
srx.transport_type,
171 peer->
srx.transport.family,
172 &peer->
srx.transport.sin.sin_addr,
173 ntohs(peer->
srx.transport.sin.sin_port));
175 _leave(
" = %p {u=%d}", peer, usage);
212 peer->
srx.transport.sin.sin_port == port &&
213 peer->
srx.transport.sin.sin_addr.s_addr == addr)
221 _leave(
" = -EAFNOSUPPORT");
232 _net(
"Rx UDP DGRAM from NEW peer");
234 _leave(
" = -EBUSY [new]");
235 return ERR_PTR(-
EBUSY);
273 if (list_empty(&rxrpc_peers))
289 if (!list_empty(&rxrpc_peers)) {
293 while (!list_empty(&rxrpc_peers)) {