net: bpf: fix off by one in seccomp_choose

We were off by one when iterating through states, so simply fix
that by choosing the correct max limit.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
ETH_P_802_3_MIN back compat.
configure.sh: use colors only with terminal

The color codes mess up less and log files.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
configure.sh: use gcc as default compiler

Cross compilers might not have cc symlink but do have gcc.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
configure.sh: expand tilde from CROSS_COMPILE variable

Users can define cross compiler paths like
CROSS_COMPILE="ccache ~/bin/arm/bin/..." and would like this to work.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Makefile: use gcc as compiler

Cross compilers might not have cc symlink to gcc.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Makefile: support sysroot for libs and includes

Helps with cross compilation when correct lib and include files
are used.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Define IP_MULTICAST_ALL if header files don't have it

Older systems have it defined in <linux/in.h> which conflicts with
<netinet/in.h>.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
net/irda_setsockopt.c: workaround for old irda headers

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
net/netlink.c: support older kernels and headers

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
net/netlink_setsockopt.c: workaround for old headers

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Makefile: install depends on trinity target

After this 'make install' just works.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
compat.h: Add if_ether.h symbols for older kernels.

This patch fixes these build errors on CentOS 6.

  CC	net/ether.o
net/ether.c:12: error: ‘ETH_P_BATMAN’ undeclared here (not in a function)
net/ether.c:19: error: ‘ETH_P_LINK_CTL’ undeclared here (not in a function)
net/ether.c:21: error: ‘ETH_P_8021AD’ undeclared here (not in a function)
net/ether.c:21: error: ‘ETH_P_802_EX1’ undeclared here (not in a function)
net/ether.c:22: error: ‘ETH_P_8021AH’ undeclared here (not in a function)
net/ether.c:22: error: ‘ETH_P_MVRP’ undeclared here (not in a function)
net/ether.c:23: error: ‘ETH_P_QINQ1’ undeclared here (not in a function)
net/ether.c:24: error: ‘ETH_P_QINQ2’ undeclared here (not in a function)
net/ether.c:24: error: ‘ETH_P_QINQ3’ undeclared here (not in a function)
net/ether.c:31: error: ‘ETH_P_CANFD’ undeclared here (not in a function)
net/ether.c:34: error: ‘ETH_P_CAIF’ undeclared here (not in a function)

Signed-off-by: Vinson Lee <vlee@twitter.com>
Merge branch 'master' into openbsd
add EPOLL, EVENTFD, OS detection to configure script
added USE_EPOLL to appropriate files related to epoll, replaced OpenBSD to __BSD__,
uncomment syscall headers for another archs