OSDN Git Service

bpf: use skb_expand_head in bpf_out_neigh_v4/6
authorVasily Averin <vvs@virtuozzo.com>
Mon, 2 Aug 2021 08:52:54 +0000 (11:52 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Aug 2021 10:21:39 +0000 (11:21 +0100)
commita1e975e117ad657dedafed2ab64ce4ddccc9883b
treedf5e158b6f812e8d1de3d432fa44629f30fe47a2
parent53744a4a72afe11779e0c69bbe0fff7dcd83e3ce
bpf: use skb_expand_head in bpf_out_neigh_v4/6

Unlike skb_realloc_headroom, new helper skb_expand_head
does not allocate a new skb if possible.

Additionally this patch replaces commonly used dereferencing with variables.

Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c