Commit Graph

45 Commits

Author SHA1 Message Date
Stephen Hemminger
aaf7045802 configure: cleanup
Don't echo "-e" when using builtin echo in bash.
2015-06-25 15:10:22 -04:00
Vadim Kochan
b6907403ef configure: Check for libmnl
Indicate existence of libmnl which is required by tipc.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-06-24 23:09:25 -04:00
Stephen Hemminger
93531fac41 Merge branch 'master' into net-next 2015-04-13 09:39:46 -07:00
Stephen Hemminger
672acc7238 fix whitespace 2015-04-13 09:39:34 -07:00
Nicolas Dichtel
5a2ce86823 Revert "ip netns: Fix rtnl error while print netns list"
This reverts commit d116ff3414.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2015-04-13 08:50:10 -07:00
Nicolas Dichtel
694ed195a0 Revert "configure: add missing INCLUDE to netnsid detection"
This reverts commit d059de70ca.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2015-04-13 08:50:10 -07:00
Stephen Hemminger
f0eb8da59a Merge branch 'master' into net-next 2015-04-10 13:27:37 -07:00
Jiri Benc
d059de70ca configure: add missing INCLUDE to netnsid detection
Fixes: d116ff3414 ("ip netns: Fix rtnl error while print netns list")
Signed-off-by: Jiri Benc <jbenc@redhat.com>
2015-04-10 13:23:35 -07:00
Daniel Borkmann
11c39b5e98 tc: add eBPF support to f_bpf
This work adds the tc frontend for kernel commit e2e9b6541dd4 ("cls_bpf:
add initial eBPF support for programmable classifiers").

A C-like classifier program (f.e. see e2e9b6541dd4) is being compiled via
LLVM's eBPF backend into an ELF file, that is then being passed to tc. tc
then loads, if any, eBPF maps and eBPF opcodes (with fixed-up eBPF map file
descriptors) out of its dedicated sections, and via bpf(2) into the kernel
and then the resulting fd via netlink down to cls_bpf. cls_bpf allows for
annotations, currently, I've used the file name for that, so that the user
can easily identify his filter when dumping configurations back.

Example usage:

  clang -O2 -emit-llvm -c cls.c -o - | llc -march=bpf -filetype=obj -o cls.o
  tc filter add dev em1 parent 1: bpf run object-file cls.o classid x:y

  tc filter show dev em1 [...]
  filter parent 1: protocol all pref 49152 bpf handle 0x1 flowid x:y cls.o

I placed the parser bits derived from Alexei's kernel sample, into tc_bpf.c
as my next step is to also add the same support for BPF action, so we can
have a fully fledged eBPF classifier and action in tc.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
2015-03-24 15:45:23 -07:00
Vadim Kochan
d116ff3414 ip netns: Fix rtnl error while print netns list
Observed on the Linux 3.18:

    # ip netns
    RTNETLINK answers: Operation not supported
    net0

CC: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Fixes: d182ee1307 ("ipnetns: allow to get and set netns ids")
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2015-03-15 12:17:34 -07:00
vadimk
10ed8b7f67 configure: Add check for the doc tools
Added checking existence of the doc files converters.
If the XXX tool exists then HAVE_XXX:=y will be written
to the Config file. Example of the configure script output:

TC schedulers
 ATM	no
 IPT	using xtables
 IPSET  yes

iptables modules directory: /usr/lib/iptables
libc has setns: yes
SELinux support: no

Docs
 latex: no
 WARNING: no docs can be built from LaTeX files
 sgml2html: yes

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
2014-11-30 09:50:25 -08:00
Richard Haines
116ac9270b ss: Add support for retrieving SELinux contexts
The process SELinux contexts can be added to the output using the -Z
option. Using the -z option will show the process and socket contexts (see
the man page for details).
For netlink sockets: if valid process show process context, if pid = 0
show kernel initial context, if unknown show "unavailable".

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
2014-03-10 13:20:49 -07:00
Stephen Hemminger
ae7b9a0d5c configure: restore old behaviour
Previous change wasn't needed, since merge of
	configure: move toolchain init to a function
2012-12-19 16:01:39 -08:00
Stephen Hemminger
07a6f5eca2 build: indent shell functions in configure
Script has lots of shell functions but never indented properly.
2012-12-18 09:20:13 -08:00
Jan Engelhardt
d29feaaa35 build: unbreak linakge of m_xt.so
Commit v3.7.0~10 caused the variable new PKG_CONFIG variable never
to be present at the time of calling make, leading to tc/m_xt.so
not linked with -lxtables (result from pkg-config xtables --libs),
that in turn leading to

tc: symbol lookup error: /usr/lib64/tc//m_xt.so: undefined symbol:
xtables_init_all

Fixing that.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2012-12-18 09:18:45 -08:00
Mike Frysinger
95d9d665d9 configure: pull AR from the env too
This matches the existing CC behavior.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-17 09:13:46 -08:00
Mike Frysinger
601f60e552 configure: move toolchain init to a function
The layout of this file uses functions to update Config.  Move the
toolchain logic to the same style to fix setting the vars in Config.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-17 09:13:46 -08:00
Wookey
35122a7500 configure: respect $CC environment var override
Enables e.g. cross-compiling by setting $CC env var.  This patch
extracted from the Ubuntu package (thanks, Wookey and Colin Watson).

BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=670660
BugLink: https://bugs.launchpad.net/bugs/870197

Signed-off-by: Kamal Mostafa <kamal@debian.org>
2012-11-16 08:06:19 -08:00
Mike Frysinger
e4fc4ada33 allow pkg-config to be customized
Rather than hard coding `pkg-config`, use ${PKG_CONFIG} so people can
override it to their specific version (like when cross-compiling).

This is the same way the upstream pkg-config code works.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-11 16:21:34 -08:00
Mathias Krause
c2f7d6c7c4 configure: remove TMPDIR on exit
Commit e557d1a ("Don't put configure files in /tmp") introduced a typo
that prevented automated cleanup of the temporary directory created for
feature testing. Fix this typo.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
2012-09-04 09:42:16 -07:00
Li Wei
da7fbb24c7 iproute2: configure: Add search path for 64bit library.
Use pkg-config to tell us the library path and fallback to search
old paths if xtables.pc not exists.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
2012-08-20 09:01:16 -07:00
Florian Westphal
8194411a42 tc: add ipset ematch
example usage:
tc filter add dev $dev parent $id: basic match not ipset'(foobar src)' ..

also updates iproute2/ematch_map, else tc complains:
Error: Unable to find ematch "ipset" in /etc/iproute2/ematch_map
Please assign a unique ID to the ematch kind the suggested entry is:
        8       ipset

when trying to use this ematch.

(text ematch (5) only exists in kernel, a vlan ematch (6) exists neither in
 kernel nor userspace, but kernel headers define TCF_EM_VLAN == 6).
2012-08-13 08:33:50 -07:00
Stephen Hemminger
e557d1ac3a Don't put configure files in /tmp
Based on patch by Vasiliy Kulikov <segoon@openwall.com>
Don't use /tmp since it is dangerous, instead put temporary files
from configure script in build directory. This is what autoconf
generated configure does.
2012-02-15 10:03:39 -08:00
Jan Engelhardt
d7aa57d450 iproute2: proper detection of libxtables position and flags
Upstream: not sent yet

Any tests involving iptables _MUST_ utilize pkg-config to find the
proper locations of the installation.
2012-01-03 15:05:25 -08:00
Eric W. Biederman
2e8a07f543 iproute2: Auto-detect the presence of setns in libc
If libc has setns present use that version instead of
rolling the syscall wrapper by hand.

Dan McGee found the following compile error:

    gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include
    -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\"   -c -o ipnetns.o ipnetns.c
    ipnetns.c:31:12: error: static declaration of ‘setns’ follows non-static
    declaration
    /usr/include/bits/sched.h:93:12: note: previous declaration of ‘setns’
    was here
    make[1]: *** [ipnetns.o] Error 1

Reported-by:  Dan McGee <dan@archlinux.org>
Tested-by:  Dan McGee <dan@archlinux.org>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
2011-08-31 11:02:02 -07:00
Dan McGee
44e743e588 Make iproute2 configure script more flexible
On Arch Linux, we still install the iptables shared libraries in
/usr/lib/iptables/, even though the main library is installed to
/usr/lib/libxtables.so. This change checks all available locations to
correctly find the iptables library directory.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-31 10:56:12 -07:00
Gilles Espinasse
4f69c63a4b iproute2: fix minor typo in comments
Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2011-07-11 10:11:09 -07:00
Andreas Henriksson
12ddfff76c iproute2: detect iptables modules dir in configure.
Try to automatically detect iptables modules directory.

Make the configure script look for iptables modules.
This also makes it possible to specify it on the
command line while building via "make IPT_LIB_DIR=/foo/bar".

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2010-03-29 15:10:20 -07:00
Andreas Henriksson
14743a78eb iproute2: avoid using bashisms in configure script.
"function foo" should be "foo()" to work when sh is not bash.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2010-01-21 10:09:22 -08:00
Andreas Henriksson
f1a0125bc0 Slightly improve the configure script.
Split up in functions. Make XT checks bail if previous XT check
was successful.

This result improves the output of the configure script to not indicate
using iptables only because the last test failed (when previous ones could
have already succeded).

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2009-12-26 10:24:06 -08:00
Andreas Henriksson
a36ceb85d7 Add new (iptables 1.4.5 compatible) tc/ipt/xt module.
Add a new cleaned up m_xt.c based on m_xt_old.c
The new m_xt.c has been updated to use the new names and new api
that xtables exposes in iptables 1.4.5.
All the old internal api cruft has also been dropped.

Additionally, a configure script test is added to check for
the new xtables api and set the TC_CONFIG_XT flag in Config.
(tc/Makefile already handles this flag in previous commit.)

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2009-12-26 10:09:27 -08:00
Andreas Henriksson
80d689d055 Keep the old tc/ipt/xt module for compatibility.
Move the file and rename the configure flags.
The file is being kept around for iptables < 1.4.5 compatibility.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2009-12-26 10:09:26 -08:00
Jamal Hadi Salim
63c7d26f94 Breakage noticed when debian upgraded to xtables (iptables > 1.4.1)
Many thanks to Yevgeny Kosarzhevsky <yevg@pisem.net> for reporting
and a lot of testing

Thanks to Jan Engelhardt <jengelh@medozas.de> for a lot of advice
Thanks to Denys Fedoryschenko <denys@visp.net.lb> for some sample
code that he tried and thanks to Andreas Henriksson <andreas@fatal.se>
(who maintains iproute2 on debian) for the persistent followup.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
2009-02-19 09:02:13 -08:00
Stephen Hemminger
45719416f9 Change mode of configure to executable.
Update .gitignore
2006-09-25 11:54:10 -07:00
net[shemminger]!shemminger
b70c1b9f09 Import patch iproute2.111
(Logical change 1.113)
2005-01-17 23:26:46 +00:00
net[shemminger]!shemminger
00fa84801e Import patch mirred.patch
(Logical change 1.111)
2004-12-08 20:13:56 +00:00
net[shemminger]!shemminger
8e64f6fe1f Import patch gact_iproute-2.6.8_patch
(Logical change 1.74)
2004-08-30 21:07:09 +00:00
osdl.net!shemminger
4b1bbd9c18 Remove configuration options for stuff using our copied header files.
(Logical change 1.62)
2004-08-09 16:35:28 +00:00
osdl.net!shemminger
b9cb1c9a4b XFRM is now a config optio.
(Logical change 1.60)
2004-07-30 22:27:50 +00:00
osdl.net!shemminger
3876b3c378 Test for HTB version match
(Logical change 1.59)
2004-07-30 20:50:38 +00:00
osdl.net!shemminger
2979d52f45 Use test program to make sure netem is correct type.
(Logical change 1.57)
2004-07-30 20:24:59 +00:00
osdl.net!shemminger
c830d77b8f Don't just look for header files, try a link.
(Logical change 1.47)
2004-07-02 17:47:53 +00:00
osdl.net!shemminger
6202b4c185 netsim --> netem
(Logical change 1.43)
2004-07-01 22:22:10 +00:00
osdl.net!shemminger
449bf1f339 (Logical change 1.33) 2004-06-25 21:14:22 +00:00
osdl.net!shemminger
aa48b4d581 Initial revision 2004-06-25 21:13:49 +00:00