udp.c (2dbb9b9e6df67d444fbe425c7f6014858d337adf) udp.c (8217ca653ec601246832d562207bc24bdf652d2f)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * The User Datagram Protocol (UDP).
7 *
8 * Authors: Ross Biro

--- 485 unchanged lines hidden (view full) ---

494 hslot2 = &udptable->hash2[slot2];
495 if (hslot->count < hslot2->count)
496 goto begin;
497
498 result = udp4_lib_lookup2(net, saddr, sport,
499 daddr, hnum, dif, sdif,
500 exact_dif, hslot2, skb);
501 }
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * The User Datagram Protocol (UDP).
7 *
8 * Authors: Ross Biro

--- 485 unchanged lines hidden (view full) ---

494 hslot2 = &udptable->hash2[slot2];
495 if (hslot->count < hslot2->count)
496 goto begin;
497
498 result = udp4_lib_lookup2(net, saddr, sport,
499 daddr, hnum, dif, sdif,
500 exact_dif, hslot2, skb);
501 }
502 if (unlikely(IS_ERR(result)))
503 return NULL;
502 return result;
503 }
504begin:
505 result = NULL;
506 badness = 0;
507 sk_for_each_rcu(sk, &hslot->head) {
508 score = compute_score(sk, net, saddr, sport,
509 daddr, hnum, dif, sdif, exact_dif);
510 if (score > badness) {
511 if (sk->sk_reuseport) {
512 hash = udp_ehashfn(net, daddr, hnum,
513 saddr, sport);
514 result = reuseport_select_sock(sk, hash, skb,
515 sizeof(struct udphdr));
504 return result;
505 }
506begin:
507 result = NULL;
508 badness = 0;
509 sk_for_each_rcu(sk, &hslot->head) {
510 score = compute_score(sk, net, saddr, sport,
511 daddr, hnum, dif, sdif, exact_dif);
512 if (score > badness) {
513 if (sk->sk_reuseport) {
514 hash = udp_ehashfn(net, daddr, hnum,
515 saddr, sport);
516 result = reuseport_select_sock(sk, hash, skb,
517 sizeof(struct udphdr));
518 if (unlikely(IS_ERR(result)))
519 return NULL;
516 if (result)
517 return result;
518 }
519 result = sk;
520 badness = score;
521 }
522 }
523 return result;

--- 2410 unchanged lines hidden ---
520 if (result)
521 return result;
522 }
523 result = sk;
524 badness = score;
525 }
526 }
527 return result;

--- 2410 unchanged lines hidden ---