Fix ip6tunnel.c to be fit with current ip command style.
Unlike other modules currently iptunnel (and ip6tunnel) is not
designed as protocol-independent because of unarranged structure
between IPv4 and IPv6.
Usage: ip -f inet6 tunnel { add | change | del | show } [ NAME ]
[ remote ADDR local ADDR ] [ dev PHYS_DEV ]
[ encaplimit ELIM ]
[ hoplimit HLIM ] [ tc TC ] [ fl FL ]
[ dscp inherit ]
This file (ip6tunnel.c) is renamed from ipv6tunnel.c which is imported
from usagi cvs tree. It is originally ported by MIPL to work on their
2.4 kernel patch (MIPL1).
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Split common functions like ioctl to export them.
This is a preparation to support to configure IPv6-over-IPv6 tunnel.
This patch also includes minor improvemen:
o to stop to include unused headers
o to change function static if it is not needed to be exported
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Patch which allows for setting SA and SP also for
new IPSec mode BEET, beside tunnel and transport, according to the latest
changes in the kernel you can find at the following link:
Signed-off-by: Diego Beltrami <diego.beltrami@gmail.com> Signed-off-by: Miika Komu <miika@iki.fi> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
The current genl Makefile sticks -lm and -ldl into LDFLAGS ... however, this
does not create the proper link order as the implicit Makefile rules will
place LDFLAGS before object files
attached patch uses LDLIBS for -lm and -ldl and make's implicit rule will
place them in the proper location
also, i removed the -s argument to `install` as install does stripping
improperly in many scenarios (such as cross-compiling) ... and in general,
it's nice if the decision to strip is handled by the sysadmin
-mike
Andy Gay [Fri, 11 Aug 2006 00:25:40 +0000 (20:25 -0400)]
Fix struct alignment with cris architecture
[IPROUTE]: Fix struct alignment with cris architecture
gcc for the cris arch does not pad structures to the next multiple of 4
bytes, as the i386 gcc does.
This causes errors like this when displaying xfrm policies:
# ip x p
!!!Deficit 3, rta_len=300
src 192.168.251.32/29 dst 192.168.251.32/29
dir in priority 0
!!!Deficit 3, rta_len=180
src 0.0.0.0/0 dst 192.168.251.32/29
dir in priority 2208
....
Similar errors are seen from ip x s.
This patch fixes the errors when printing. I'm not sure whether we
should worry about other uses of the affected structs, I've not seen any
other bad effects from this though, so hopefully this is enough.
(Thanks to Herbert Xu for pointing out that NLMSG_SPACE is the correct
macro to use here.)
Tested against 2.6.17.6 kernel on i386, and 2.6.16.1 kernel on cris.
Signed-off-by: Andy Gay <andy@andynet.net> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Patrick McHardy [Thu, 10 Aug 2006 22:14:51 +0000 (00:14 +0200)]
Add support for larger number of routing tables
[IPROUTE]: Add support for larger number of routing tables
Support support for 2^32 routing tables by using the new RTA_TABLE
attribute for specifying tables > 255 and intepreting it if it is
sent by the kernel.
When tables > 255 are used on a kernel not supporting it an error will
occur because of the unknown netlink attribute.
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Patrick McHardy [Thu, 10 Aug 2006 22:14:49 +0000 (00:14 +0200)]
Preparation for 32 bit table IDs
[IPROUTE]: Preparation for 32 bit table IDs
The route table filter uses an integer for the table number and the value
-1 to represent cloned routes. For 32 bit table IDs it needs to become an
unsigned, so this won't work anymore. Introduce a new filter flag "cloned"
and use instead of filter.tb = -1.
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Patrick McHardy [Thu, 10 Aug 2006 20:42:58 +0000 (22:42 +0200)]
The current behaviour for IPv6 routing table filters is to derive the
table from the route type. This doesn't really work anymore now that IPv6
supports multiple tables. Add detection for IPv6 multiple table support
(relying on the fact that the first routes dumped belong to the local table
and have rtm_table == RT_TABLE_LOCAL with multiple tables) and handle it
like other protocols.
This patch adds a generic netlink controller interface.
The controller is the only module using this at the moment.
Thomas has a sample user of genetlink that would fit here; bug him
for it.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
This patch adds ability to monitor tc events similar to ipmonitor.
User runs "tc monitor" (without quotes) and watches events of
addition, deletion and updates from qdiscs, classes, filters and
actions as they happen.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Heres another on top of the others i sent. If you get the time, can
update your git tree with these patches?
If you are planning to make a release soon, please ping me - I have at
least one more patch that i need to work on.
cheers,
jamal
Update mirred usage to fix a bug noticed by
Andy Furniss <lists@andyfurniss.entadsl.com>
Also make it a little more readable.
Proposed patch to iproute to add Initial Max Congestion Window Size route tuning parameter
Vince Worthington wrote:
> Hello,
>
> We've been working with a customer of ours who was experiencing some
> latency issues, and in the process of helping them solve their problem
> we found that adding the ability to adjust the Initial Max Congestion
> Window size on a route, they were able to tune their routes to perform
> more favorably in their mixed Linux and Solaris environment. There
> were a couple of other tuning steps necessary as well but we did find
> that the ability to set a larger initial max congestion window size
> was helpful in making Linux behave more like Solaris in low-latency
> situations.
>
> The kernel already supports this route attribute, this patch simply
> adds the option to iproute.c to provide a means to set it from userspace.
>
> I've attached the patch we used in test builds of the iproute packages
> we distribute in RHEL3 and RHEL4 for your consideration for possible
> acceptance and inclusion in iproute. Please let us know if there is
> any further information you would need or if there is a more
> appropriate venue to submit this patch.
>
> Thanks,
> Vince Worthington
> Red Hat, Inc.
Stephen,
I apologize for the last patch I sent not applying cleanly to the latest
iproute2 sources. I realized that this might impede any
review/acceptance of the patch and created a separate patch against the 20060323 build of iproute2, which seems to be the latest (by looking at
the website).
The previous patch wouldn't apply cleanly due to the label of the
ssthresh argument being corrected from REALMS to NUMBER.
Please let us know if there is any other information or assistance we
can be with this patch submission.
if you simply run `ifcfg iface`, you get:
/sbin/ifcfg: line 25: [: too many arguments
/sbin/ifcfg: line 26: [: -ge: unary operator expected
/sbin/ifcfg: line 27: [: -ge: unary operator expected
/sbin/ifcfg: line 28: [: -ge: unary operator expected
shemminger [Tue, 21 Mar 2006 23:57:50 +0000 (23:57 +0000)]
The ip(8) command has a bug when dealing with IPoIB link layer
addresses. Specifically it does not correctly handle the addition of
new entries in the neighbor/arp table. For example, this command will
fail:
ip neigh add 192.168.0.138 lladdr
00:00:04:04:fe:80:00:00:00:00:00:00:00:01:73:00:00:00:8a:91 nud
permanent dev ib0
An IPoIB link layer address is 20-bytes (see
http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-09.txt,
section 9.1.1).
The command line parsing code expects link layer addresses to be a
maximum of 16-bytes. Addresses over 16-bytes are truncated.
shemminger [Tue, 4 Oct 2005 23:15:32 +0000 (23:15 +0000)]
When assigning an ip address to an ethernet adapter, the newest
(050929) version of 'ip addr' hangs while older versions worked.
The problem was traced to be a removed initialisation. The patch
below corrects this problem.