linux-stable/net/core
Michal Sekletar ea02f9411d net: introduce SO_BPF_EXTENSIONS
For user space packet capturing libraries such as libpcap, there's
currently only one way to check which BPF extensions are supported
by the kernel, that is, commit aa1113d9f8 ("net: filter: return
-EINVAL if BPF_S_ANC* operation is not supported"). For querying all
extensions at once this might be rather inconvenient.

Therefore, this patch introduces a new option which can be used as
an argument for getsockopt(), and allows one to obtain information
about which BPF extensions are supported by the current kernel.

As David Miller suggests, we do not need to define any bits right
now and status quo can just return 0 in order to state that this
versions supports SKF_AD_PROTOCOL up to SKF_AD_PAY_OFFSET. Later
additions to BPF extensions need to add their bits to the
bpf_tell_extensions() function, as documented in the comment.

Signed-off-by: Michal Sekletar <msekleta@redhat.com>
Cc: David Miller <davem@davemloft.net>
Reviewed-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-18 19:08:58 -08:00
..
datagram.c net, datagram: fix the incorrect comment in zerocopy_sg_from_iovec() 2013-10-29 00:19:04 -04:00
dev.c net-sysfs: add support for device-specific rx queue sysfs attributes 2014-01-16 23:46:06 -08:00
dev_addr_lists.c net: remove dead code for add/del multiple 2013-12-17 15:14:04 -05:00
dev_ioctl.c net_tstamp: Add SIOCGHWTSTAMP ioctl to match SIOCSHWTSTAMP 2013-11-19 19:07:21 +00:00
drop_monitor.c net: drop_monitor: fix the value of maxattr 2013-12-09 21:10:38 -05:00
dst.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
ethtool.c net: Add layer 2 hardware acceleration operations for macvlan devices 2013-11-07 19:11:41 -05:00
fib_rules.c net: Fix "ip rule delete table 256" 2013-11-08 14:53:10 -05:00
filter.c bpf: do not use reciprocal divide 2014-01-15 17:02:08 -08:00
flow.c net: delete __cpuinit usage from all net files 2013-07-14 19:36:58 -04:00
flow_dissector.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-14 14:42:42 -08:00
gen_estimator.c net_sched: add 64bit rate estimators 2013-06-11 02:51:03 -07:00
gen_stats.c net_sched: add 64bit rate estimators 2013-06-11 02:51:03 -07:00
iovec.c net: rework recvmsg handler msg_name and msg_namelen logic 2013-11-20 21:52:30 -05:00
link_watch.c net: make all team port device link events urgent 2013-06-13 02:31:41 -07:00
Makefile net: netprio: rename config to be more consistent with cgroup configs 2014-01-03 23:41:42 +01:00
neighbour.c neigh: split lines for NEIGH_VAR_SET so they are not too long 2014-01-15 14:46:00 -08:00
net-procfs.c rps: selective flow shedding during softnet overflow 2013-05-20 13:48:04 -07:00
net-sysfs.c net-sysfs: add support for device-specific rx queue sysfs attributes 2014-01-16 23:46:06 -08:00
net-sysfs.h net: netdev_kobject_init: annotate with __init 2014-01-05 20:27:54 -05:00
net-traces.c
net_namespace.c userns: Kill nsown_capable it makes the wrong thing easy 2013-08-30 23:44:11 -07:00
netclassid_cgroup.c net: net_cls: move cgroupfs classid handling into core 2014-01-03 23:41:41 +01:00
netevent.c
netpoll.c net: core: explicitly select a txq before doing l2 forwarding 2014-01-10 13:23:08 -05:00
netprio_cgroup.c net: more spelling fixes 2013-12-10 21:57:11 -05:00
pktgen.c {xfrm,pktgen} Fix compiling error when CONFIG_XFRM is not set 2014-01-10 07:46:24 +01:00
request_sock.c tcp: fix a panic on UP machines in reqsk_fastopen_remove 2013-01-14 18:10:05 -05:00
rtnetlink.c bonding: add netlink attributes to slave link dev 2014-01-17 18:51:58 -08:00
scm.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2013-09-07 14:35:32 -07:00
secure_seq.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-10-23 16:49:34 -04:00
skbuff.c net: add skb_checksum_setup 2014-01-14 14:24:19 -08:00
sock.c net: introduce SO_BPF_EXTENSIONS 2014-01-18 19:08:58 -08:00
sock_diag.c sock_diag: fix filter code sent to userspace 2013-06-10 22:23:32 -07:00
stream.c net: replace macros net_random and net_srandom with direct calls to prandom 2014-01-14 15:15:25 -08:00
sysctl_net_core.c rps: NUMA flow limit allocations 2013-12-19 19:00:07 -05:00
timestamping.c
user_dma.c
utils.c net: make net_get_random_once irq safe 2013-10-25 19:03:39 -04:00