Commit Graph

32 Commits

Author SHA1 Message Date
Stephen Hemminger
07b65f312f netem: add SPDX license header
The netem directory contains code to generate tables for netem.
This code came from NISTnet which was public domain.
Add appropriate license tag.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-01-14 09:00:34 -08:00
Stephen Hemminger
e5cd5a51f9 doc: remove trailing whitespace
Run whitespace scrubbing script to remove unnecessary trailing
blanks at end of line and end of file.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@gmail.com>
2018-12-19 12:02:38 -08:00
Stephen Hemminger
6054c1ebf7 SPDX license identifiers
For all files in iproute2 which do not have an obvious license
identification, mark them with SPDK GPL-2

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-11-24 12:21:35 -08:00
Stephen Hemminger
f474588028 Merge branch 'master' into net-next 2017-08-24 15:30:32 -07:00
Phil Sutter
92963d136d netem/maketable: Check return value of fscanf()
Signed-off-by: Phil Sutter <phil@nwl.cc>
2017-08-24 15:22:10 -07:00
Stephen Hemminger
5f1df307b4 config: put CFLAGS/LDLIBS in config.mk
This renames Config to config.mk and includes more Make input.
Now configure generates all the required CFLAGS and LDLIBS for
the optional libraries.

Also, use pkg-config to test for libelf, rather than using a test
program. This makes it consistent with other libraries.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-08-23 10:03:09 -07:00
Phil Sutter
d304b05c12 netem/maketable: Check return value of fstat()
Otherwise info.st_size may contain garbage.

Signed-off-by: Phil Sutter <phil@nwl.cc>
2017-08-21 17:17:00 -07:00
Stephen Hemminger
69fed534a5 change how Config is used in Makefile's
The recent LIBMNL changes was made more difficult to debug because
of how Config is handle in clean make. The Config file is generated
by top level make, but since it is not recursive, the values generated
would not be visible on a clean make.

The change is to not include Config in top level make, and move
all the conditionals down into sub makefiles. Not ideal, but beter
than going full autoconf route. Or forcing separate configure
step.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-08-09 09:10:52 -07:00
Stephen Hemminger
89ec74a3ea remove duplicated #include's
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-07-18 17:17:15 -07:00
Stephen Hemminger
2d3af1675d netem: fix out of bounds access in maketable
The maketable program used to generate one of the configuration
files at build time for netem would access past the end of the array
for one input value. This is a bug inherited from original NISTnet.
Just fold the value, like other code there.

This is not a runtime error security problem.
It only impacts the build process if the build machine
had extra hardening enabled.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-04-12 10:13:14 -07:00
Stephen Hemminger
3bad1dbb20 whitespace cleanup
Get rid of blanks at end of line and extra lines at eof

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2017-01-12 17:31:20 -08:00
Stephen Hemminger
e9e9365b56 scrub out whitespace issues
Run script that removes trailing whitespace everywhere.
2016-03-27 10:50:14 -07:00
Mike Frysinger
1a7943bcf3 netem: fix installs of dist files
The tc program searches LIBDIR by default for the .dist files, and that
defaults to /usr/lib.  But the netem subdir has /lib/ hardcoded which
means the default build+install results in the files not being found.

Further, these are plain text files which are read at runtime, so it
doesn't make sense to give them executable bits.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-07-31 19:31:04 -07:00
Rafael Almeida
b514b3587e Fixed installation when changing DESTDIR
After changing the DESTDIR the installated binaries have some issues
due to hard coded paths. For example, using distributions on NetEm
would segfault.

I've changed iplink.c and tc_util.c so they are now aware of DESTDIR.
Along with that change I needed to change the main Makefile so it
defines the DESTDIR macro when calling gcc.

I also changed the paths so that during the installation sbin, etc,
share and lib directories are created directly inside of the DESTDIR,
instead of creating a usr directory inside that. That's the behaviour
of most packages out there, so I think most users will be expecting
that to happen.
2008-07-25 13:40:19 -07:00
Bertrand Jacquin
3cc6232e08 netem: fix cross-compiling failure
The programs in netem are compiled and run on the build machine, but they
use the CFLAGS that are meant for the target system and often times, these
are incompatible.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-06-23 09:17:48 -07:00
Stephen Hemminger
81c61790d5 Eliminate trailing whitespace
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-12-13 17:05:50 -08:00
Stephen Hemminger
da7aea7946 Add ignore files to make using git easier
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-08-08 12:04:38 -07:00
Stephen Hemminger
ebfd0f3103 Added stats utility from netem 2006-06-15 16:22:09 -07:00
shemminger
319baacb12 Fix cc compiler flags in netem/Makefile 2006-03-14 19:43:59 +00:00
shemminger
7dae1706bb Add CCOPTS for netem stuff 2005-10-05 17:40:12 +00:00
shemminger
ce715cd94c Allow parallel make of netem directory.
Use HOSTCC when building local tools
2005-09-01 22:38:19 +00:00
shemminger
6864c1e789 Update to latest kernel headers.
Fix out of range on paretonormal
2005-08-08 20:24:41 +00:00
osdl.net!shemminger
f8f9de56f2 Switch to stack (rather than calloc) for tables.
(Logical change 1.176)
2005-03-30 18:11:49 +00:00
osdl.net!shemminger
6411e1f541 (Logical change 1.146) 2005-03-10 18:18:01 +00:00
osdl.net!shemminger
a399f40c46 Initial revision 2005-03-10 18:18:01 +00:00
osdl.net!shemminger
c2fdec53d0 Rename: tc/paretonormal.c -> netem/paretonormal.c
(Logical change 1.141)
2005-02-09 22:05:41 +00:00
osdl.net!shemminger
a59e8edafc Rename: tc/pareto.c -> netem/pareto.c
(Logical change 1.141)
2005-02-09 22:05:41 +00:00
osdl.net!shemminger
dfe6094d57 Rename: tc/normal.c -> netem/normal.c
(Logical change 1.141)
2005-02-09 22:05:41 +00:00
osdl.net!shemminger
b3f23c9091 Rename: tc/maketable.c -> netem/maketable.c
(Logical change 1.141)
2005-02-09 22:05:41 +00:00
osdl.net!shemminger
68a1ced053 Rename: netem/ping.trace -> netem/experimental.dat
(Logical change 1.141)
2005-02-09 22:05:41 +00:00
osdl.net!shemminger
eb1d6822e0 (Logical change 1.141) 2005-02-09 22:05:41 +00:00
osdl.net!shemminger
f84f9d0436 Initial revision 2005-02-09 22:05:41 +00:00