linux-stable/net
Brian Haley 62e395f82d neighbor: fix proxy_delay usage when it is zero
When set to zero, the neighbor sysctl proxy_delay value
does not cause an immediate reply for ARP/ND requests
as expected, it instead causes a random delay between
[0, U32_MAX). Looking at this comment from
__get_random_u32_below() explains the reason:

/*
 * This function is technically undefined for ceil == 0, and in fact
 * for the non-underscored constant version in the header, we build bug
 * on that. But for the non-constant case, it's convenient to have that
 * evaluate to being a straight call to get_random_u32(), so that
 * get_random_u32_inclusive() can work over its whole range without
 * undefined behavior.
 */

Added helper function that does not call get_random_u32_below()
if proxy_delay is zero and just uses the current value of
jiffies instead, causing pneigh_enqueue() to respond
immediately.

Also added definition of proxy_delay to ip-sysctl.txt since
it was missing.

Signed-off-by: Brian Haley <haleyb.dev@gmail.com>
Link: https://lore.kernel.org/r/20230130171428.367111-1-haleyb.dev@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-02-01 21:02:54 -08:00
..
6lowpan
9p xen: branch for v6.2-rc4 2023-01-12 17:02:20 -06:00
802 treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
8021q
appletalk
atm
ax25
batman-adv batman-adv: tvlv: prepare for tvlv enabled multicast packet type 2023-01-21 19:01:59 +01:00
bluetooth net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
bpf bpf/selftests: Verify struct_ops prog sleepable behavior 2023-01-25 10:25:57 -08:00
bpfilter
bridge bridge: use skb_ip_totlen in br netfilter 2023-02-01 20:54:27 -08:00
caif caif: don't assume iov_iter type 2023-01-13 20:44:20 -08:00
can Networking changes for 6.2. 2022-12-13 15:47:48 -08:00
ceph net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
core neighbor: fix proxy_delay usage when it is zero 2023-02-01 21:02:54 -08:00
dcb net: dcb: add helper functions to retrieve PCP and DSCP rewrite maps 2023-01-20 09:33:22 +00:00
dccp
devlink devlink: rename and reorder instances of struct devlink_cmd 2023-02-01 10:57:01 -08:00
dns_resolver
dsa net: dsa: microchip: enable port queues for tc mqprio 2023-01-23 22:12:35 -08:00
ethernet net: ethernet: use sysfs_emit() to instead of scnprintf() 2022-12-07 20:02:44 -08:00
ethtool ethtool: netlink: convert commands to common SET 2023-01-27 12:24:32 +00:00
hsr hsr: Use a single struct for self_node. 2022-12-01 20:26:22 -08:00
ieee802154 Merge tag 'ieee802154-for-net-next-2022-12-05' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next 2022-12-07 17:33:26 -08:00
ife
ipv4 net: add support for ipv4 big tcp 2023-02-01 20:54:27 -08:00
ipv6 ipv6: ICMPV6: Use swap() instead of open coding it 2023-02-01 19:55:41 -08:00
iucv
kcm net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
key Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next 2022-11-29 20:50:51 -08:00
l2tp l2tp: prevent lockdep issue in l2tp_tunnel_register() 2023-01-18 14:44:54 +00:00
l3mdev
lapb
llc
mac80211 wifi: mac80211: drop extra 'e' from ieeee80211... name 2023-01-19 14:57:51 +01:00
mac802154 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-12-08 18:19:59 -08:00
mctp net: mctp: mark socks as dead on unhash, prevent re-add 2023-01-25 13:07:37 +00:00
mpls
mptcp mptcp: userspace pm: use a single point of exit 2023-01-26 13:33:30 +01:00
ncsi net/ncsi: Silence runtime memcpy() false positive warning 2022-12-06 17:29:14 -08:00
netfilter netfilter: use skb_ip_totlen and iph_totlen 2023-02-01 20:54:27 -08:00
netlabel
netlink netlink: annotate data races around sk_state 2023-01-23 21:35:53 -08:00
netrom netrom: Fix use-after-free of a listening socket. 2023-01-24 11:54:01 +01:00
nfc net: nfc: Fix use-after-free in local_cleanup() 2023-01-13 20:53:44 -08:00
nsh
openvswitch openvswitch: use skb_ip_totlen in conntrack 2023-02-01 20:54:27 -08:00
packet packet: add TP_STATUS_GSO_TCP for tp_status 2023-02-01 20:54:27 -08:00
phonet net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
psample
qrtr net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
rds net: add missing includes of linux/sched/clock.h 2023-01-27 11:19:46 +00:00
rfkill Merge wireless into wireless-next 2023-01-17 13:36:25 +02:00
rose
rxrpc rxrpc: Fix wrong error return in rxrpc_connect_call() 2023-01-12 21:51:55 -08:00
sched net: sched: use skb_ip_totlen and iph_totlen 2023-02-01 20:54:27 -08:00
sctp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-01-27 22:56:18 -08:00
smc net: add missing includes of linux/splice.h 2023-01-27 11:19:46 +00:00
strparser
sunrpc net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
switchdev
tipc net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
tls net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
unix net: add missing includes of linux/splice.h 2023-01-27 11:19:46 +00:00
vmw_vsock virtio/vsock: replace virtio_vsock_pkt with sk_buff 2023-01-16 13:26:33 +00:00
wireless wifi: wireless: deny wireless extensions on MLO-capable devices 2023-01-19 20:01:41 +02:00
x25 net/x25: Fix to not accept on connected socket 2023-01-25 09:51:04 +00:00
xdp
xfrm xfrm: extend add state callback to set failure reason 2023-01-26 16:28:48 -08:00
compat.c
devres.c
Kconfig
Kconfig.debug
Makefile devlink: move code to a dedicated directory 2023-01-05 22:12:00 -08:00
socket.c sock: add tracepoint for send recv length 2023-01-13 10:25:10 +00:00
sysctl_net.c