linux/include/net
Stanislav Fomichev 8086fbaf49 bpf: Allow any port in bpf_bind helper
We want to have a tighter control on what ports we bind to in
the BPF_CGROUP_INET{4,6}_CONNECT hooks even if it means
connect() becomes slightly more expensive. The expensive part
comes from the fact that we now need to call inet_csk_get_port()
that verifies that the port is not used and allocates an entry
in the hash table for it.

Since we can't rely on "snum || !bind_address_no_port" to prevent
us from calling POST_BIND hook anymore, let's add another bind flag
to indicate that the call site is BPF program.

v5:
* fix wrong AF_INET (should be AF_INET6) in the bpf program for v6

v3:
* More bpf_bind documentation refinements (Martin KaFai Lau)
* Add UDP tests as well (Martin KaFai Lau)
* Don't start the thread, just do socket+bind+listen (Martin KaFai Lau)

v2:
* Update documentation (Andrey Ignatov)
* Pass BIND_FORCE_ADDRESS_NO_PORT conditionally (Andrey Ignatov)

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrey Ignatov <rdna@fb.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200508174611.228805-5-sdf@google.com
2020-05-09 00:48:20 +02:00
..
9p
bluetooth Bluetooth: Clear HCI_LL_RPA_RESOLUTION flag on reset 2020-04-15 16:51:07 +03:00
caif
iucv
netfilter netfilter: nf_tables: allow up to 64 bytes in the set element data area 2020-04-27 22:20:09 +02:00
netns tcp: add hrtimer slack to sack compression 2020-04-30 13:24:01 -07:00
nfc
phonet
sctp
tc_act net: schedule: add action gate offloading 2020-05-01 16:08:19 -07:00
6lowpan.h
Space.h
act_api.h
addrconf.h ipv6: Honor all IPv6 PIO Valid Lifetime values 2020-04-23 12:29:21 -07:00
af_ieee802154.h
af_rxrpc.h
af_unix.h
af_vsock.h
ah.h
arp.h
atmclip.h
ax25.h
ax88796.h
bareudp.h
bond_3ad.h
bond_alb.h
bond_options.h
bonding.h
bpf_sk_storage.h
busy_poll.h
calipso.h
cfg80211-wext.h
cfg80211.h docs: networking: convert radiotap-headers.txt to ReST 2020-04-30 12:56:37 -07:00
cfg802154.h
checksum.h
cipso_ipv4.h
cls_cgroup.h
codel.h
codel_impl.h
codel_qdisc.h
compat.h
datalink.h
dcbevent.h
dcbnl.h
devlink.h
dn.h
dn_dev.h
dn_fib.h
dn_neigh.h
dn_nsp.h
dn_route.h
drop_monitor.h
dsa.h
dsfield.h
dst.h
dst_cache.h
dst_metadata.h
dst_ops.h
erspan.h
esp.h
espintcp.h
ethoc.h
failover.h
fib_notifier.h
fib_rules.h
firewire.h
flow.h
flow_dissector.h
flow_offload.h net: schedule: add action gate offloading 2020-05-01 16:08:19 -07:00
fou.h
fq.h
fq_impl.h
garp.h
gen_stats.h
genetlink.h
geneve.h
gre.h
gro_cells.h
gtp.h
gue.h
hwbm.h
icmp.h
ieee80211_radiotap.h
ieee802154_netdev.h
if_inet6.h
ife.h
ila.h
inet6_connection_sock.h
inet6_hashtables.h
inet_common.h bpf: Allow any port in bpf_bind helper 2020-05-09 00:48:20 +02:00
inet_connection_sock.h
inet_ecn.h
inet_frag.h
inet_hashtables.h
inet_sock.h
inet_timewait_sock.h
inetpeer.h
ip.h
ip6_checksum.h
ip6_fib.h
ip6_route.h net: ipv6: new arg skip_notify to ip6_rt_del 2020-04-28 12:50:37 -07:00
ip6_tunnel.h
ip_fib.h
ip_tunnels.h
ip_vs.h
ipcomp.h
ipconfig.h
ipv6.h net: ipv6: remove unused inline function ip6_set_txhash 2020-04-24 16:58:34 -07:00
ipv6_frag.h
ipv6_stubs.h net: Refactor arguments of inet{,6}_bind 2020-05-09 00:48:20 +02:00
ipx.h
iw_handler.h
kcm.h
l3mdev.h
lag.h
lapb.h
lib80211.h
llc.h
llc_c_ac.h
llc_c_ev.h
llc_c_st.h
llc_conn.h
llc_if.h
llc_pdu.h
llc_s_ac.h
llc_s_ev.h
llc_s_st.h
llc_sap.h
lwtunnel.h
mac80211.h mac80211: populate debugfs only after cfg80211 init 2020-04-24 11:30:13 +02:00
mac802154.h
macsec.h
mip6.h
mld.h
mpls.h
mpls_iptunnel.h
mptcp.h tcp: mptcp: use mptcp receive buffer space to select rcv window 2020-04-25 20:37:52 -07:00
mrp.h
ncsi.h
ndisc.h ipv6: ndisc: RFC-ietf-6man-ra-pref64-09 is now published as RFC8781 2020-04-22 12:15:07 -07:00
neighbour.h
net_failover.h
net_namespace.h
net_ratelimit.h
netevent.h
netlabel.h
netlink.h netlink: add infrastructure to expose policies to userspace 2020-04-30 17:51:42 -07:00
netprio_cgroup.h
netrom.h
nexthop.h
nl802154.h
nsh.h
p8022.h
page_pool.h
pie.h
ping.h
pkt_cls.h
pkt_sched.h
pptp.h
protocol.h
psample.h
psnap.h
raw.h
rawv6.h
red.h
regulatory.h
request_sock.h
rose.h
route.h
rpl.h
rsi_91x.h
rtnetlink.h
rtnh.h
sch_generic.h net: sched: remove unused inline function qdisc_reset_all_tx 2020-04-24 16:57:31 -07:00
scm.h
secure_seq.h
seg6.h
seg6_hmac.h
seg6_local.h
slhc_vj.h
smc.h
snmp.h
sock.h net: sock.h: fix skb_steal_sock() kernel-doc 2020-04-07 18:09:30 -07:00
sock_reuseport.h
stp.h
strparser.h
switchdev.h switchdev: mrp: Extend switchdev API to offload MRP 2020-04-27 11:40:25 -07:00
tcp.h net: Replace the limit of TCP_LINGER2 with TCP_FIN_TIMEOUT_MAX 2020-05-01 15:12:14 -07:00
tcp_states.h
timewait_sock.h
tipc.h
tls.h
tls_toe.h
transp_v6.h
tso.h
tun_proto.h
udp.h
udp_tunnel.h
udplite.h
vsock_addr.h
vxlan.h
wext.h
wimax.h
x25.h
x25device.h
xdp.h xdp: export the DEV_MAP_BULK_SIZE macro 2020-04-22 20:11:29 -07:00
xdp_priv.h
xdp_sock.h xsk: Remove unnecessary member in xdp_umem 2020-05-04 22:56:26 +02:00
xfrm.h