Commit Graph

86 Commits

Author SHA1 Message Date
Joy Latten
0c7a594541 xfrm security context support
Adds security context support to ip xfrm state.

Signed-off-by: Joy Latten <latten@austin.ibm.com>
2011-02-25 12:45:58 -08:00
Jamal Hadi Salim
c90cda9400 xfrm: add support for SA by mark
Add support for SA manipulation by mark

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
2010-03-03 16:37:29 -08:00
Alex Badea
15bb82c6fb ip xfrm state: parse and print "icmp" and "af-unspec" flags
Convert to/from XFRM_STATE_ICMP and XFRM_STATE_AF_UNSPEC state flags.

Signed-off-by: Alex Badea <abadea@ixiacom.com>
2010-01-21 10:10:34 -08:00
Herbert Xu
1758a81f49 ip: xfrm: Add AEAD support
This patch allows the user to create/manage AEAD algorithms with
the ip xfrm command.  AEAD algorithms are also known as combined-
mode algorithms.  They provide the functionality of encryption
algorithms as well as authentication algorithms.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-09-17 22:09:01 -07:00
Herbert Xu
de95ae7ca7 xfrm: Allow replay setting
Hi Stephen:

[IP] xfrm: Allow replay setting

For certain applications there is a requirement to start the
sequence number from a point other than the default.  As it
is the kernel provides an interface to do that but it isn't
available through the ip(8) command.  Since we're encouraging
people to migrate over to ip(8) for manual keying, it is useful
to have this ability there.

This patch adds support for setting replay sequence numbers
through ip(8).

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
2008-05-09 15:52:01 -07:00
Stephen Hemminger
9414cd6d38 revert earlier mistake ALGO_NAME is okay
Revert "I found out when I was writing manual page, that options ALGO_NAME and"

This reverts commit 8a1485bb21.
2008-03-08 13:29:35 -08:00
Marcela Maslanova
8a1485bb21 I found out when I was writing manual page, that options ALGO_NAME and
ALGO_KEY aren't used. If it's a bug or should it be remove it, as I did?
2008-02-22 11:57:03 -08:00
Stephen Hemminger
f31a37f79d fix problem caused by rtnl_send checks
Some usages of rtnl_send could cause errors (ie flush requests)
others do a listen afterwards.

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
2008-01-31 21:38:58 -08:00
Masahide NAKAMURA
efe69c1b72 ip: xfrm: Fix flush message.
Fix xfrm state or policy flush message.
And minor updates are included:
o Use static buffer to show unknown value as string.
o Show policy type (ptype) only when kernel specified it.
o Clean-up xfrm_monitor.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-09-05 12:56:51 +01:00
Masahide NAKAMURA
c1fa225324 ip: xfrm: Fix policy and state flags.
o Support policy flag with string format.
  Note that kernel defines only one name "localok" for the flag
  and it has not had any effect currently.
o Support state flag value XFRM_STATE_NOPMTUDISC.
o Fix to show detailed flags value when "-s" option is used.
o Fix minor typo.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-09-05 12:56:32 +01:00
Masahide NAKAMURA
ed01e39068 ip: xfrm: Clean-up for internal mask to filter.
Remove unused or redundant usage for xfrm_filter.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-09-05 12:56:17 +01:00
Stephen Hemminger
bdf9e86d72 fix last change
Need to use correct XFRMA_ constants.
Get rid of bogus casts. Fix case where no attribute returned.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-06-19 16:24:08 -07:00
jamal
0bb4a4c20c see SAD info
Stephen,
Use this patch instead of the one i sent yesterday.
As before, you will need to pull include/linux/xfrm.h from
net-2.6 once Dave applies the kernel patch.

cheers,
jamal

[XFRM] see SAD info

i.e instead of something like ip xfrm state ls | grep -i src | wc -l
do:

ip xfrm state count
And you get the count; you can also pass -s to the command line and
get the hash info.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-06-19 16:16:06 -07:00
Stephen Hemminger
ae665a522b Remove trailing whitespace
Go through source files and remove all trailing whitespace

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-12-05 10:10:22 -08:00
Masahide NAKAMURA
7ea4f5d33d XFRM: Mobile IPv6 route optimization support.
To support Mobile IPv6 RO, the following extension is included:
o Use XFRM_MODE_XXX macro instead of magic number
o New attribute option for all state: source address for
  deleting or getting message
o New attribute options for RO: care-of address, last-used timestamp
  and wild-receive flag

Note:
Flush command like `ip xfrm state flush` is to remove all XFRM state.
It has been effected for IPsec SAD but with this patch it flushes both
IPsec SAD and Mobile IPv6 RO states.
To make only IPsec SA flush, it is recommanded to specify each XFRM
protocol like below:
 `ip x s f proto esp ; ip x s f proto ah ; ip x s f proto comp`

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-12-05 10:03:32 -08:00
Stephen Hemminger
34e099e24f SA and SP in IPSec BEET mode.
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>
2006-10-19 13:15:35 -07:00
Andy Gay
af1b6a41d4 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>
2006-08-11 09:44:36 -07:00
shemminger
669ae748d6 Minor fixes from Masahide for XFRM dynamic keying 2005-11-07 18:39:30 +00:00
shemminger
c595c790a0 Fix XFRM bugs introduced by batching code.
Re-introduces the SA and policy add/del events
2005-11-01 23:03:03 +00:00
shemminger
737f15f6da Thomas's ematch fixes for lex.
Fix more GCC signedness warnings.
2005-07-08 22:08:47 +00:00
shemminger
9bec1a4363 Masahide NAKAMURA <nakam@linux-ipv6.org>
It fixes flush feature for IPsec(ip xfrm).
Jamal gave me comment about it. I've tested it on 2.6.11.7.
Please find the log below, check code and pull it:

bk://bk.skbuff.net:38000/iproute2-xfrm-flush


ChangeSet@1.182, 2005-04-13 21:19:44+09:00, nakam@linux-ipv6.org
  [ip] add "deleteall" command for xfrm;
  "flush" uses kernel's flush interface and
  "deleteall" uses legacy iproute2's flush feature like
  getting-and-deleting-for-each.
2005-06-07 21:58:25 +00:00
shemminger
90f93024a0 Monitor time patch from Masahide NAKAMURA 2005-06-07 21:55:55 +00:00
linux-ipv6.org!nakam
fb7399b2ba allocspi feature support.
support to specify sequence number.
split printing state info function for xfrm common use.

(Logical change 1.175)
2005-03-22 16:13:21 +00:00
osdl.net!shemminger
5cf576d928 Add Esp-in-udp encapsulation
(Logical change 1.152)
2005-03-10 19:04:00 +00:00
12!tgraf
2534613eeb Switch to parse_rtattr and use XFRMA_MAX directly instead of a easly
forgetable magic define

(Logical change 1.129)
2005-01-18 22:11:58 +00:00
net[shemminger]!shemminger
eaa34ee35d Import patch iproute2.117
(Logical change 1.119)
2005-01-17 23:29:39 +00:00
osdl.net!shemminger
50772dc51a Add ip rule flush capabilty and fix all the prototype changes
because of that code rewrites the nlmsghdr.

(Logical change 1.106)
2004-12-07 21:48:29 +00:00
org[shemminger]!nakam
c70b36d231 [iproute2] XFRM: support ICMP/ICMPv6's type and code
(Logical change 1.85)
2004-09-28 18:42:35 +00:00
org[shemminger]!nakam
29aa4dd76c [iproute2] XFRM: fixing protocol
(Logical change 1.84)
2004-09-28 18:40:49 +00:00
org[shemminger]!nakam
bd641cd661 [iproute2] XFRM: using flush message type
(Logical change 1.83)
2004-09-28 18:38:35 +00:00
org[shemminger]!nakam
54f7328aec [iproute2] XFRM: fixing IPsec algorithm key
(Logical change 1.82)
2004-09-28 18:36:52 +00:00
osdl.net!shemminger
6dc9f01634 make all filtering handles take const args.
(Logical change 1.77)
2004-08-31 17:45:21 +00:00
net[shemminger]!shemminger
7809c61688 Import patch xrfm-msg.patch
(Logical change 1.64)
2004-08-11 23:41:38 +00:00
net[shemminger]!shemminger
9e566a46f2 Import patch iproute-xfrm.3
2004/07/14 00:35:49-07:00 net[shemminger]!shemminger
Import patch iproute-xfrm.2

(Logical change 1.58)
2004-07-30 20:26:15 +00:00
net[shemminger]!shemminger
c7699875be Import patch ipxfrm-20040707_2.diff
(Logical change 1.53)
2004-07-07 17:05:56 +00:00
net[shemminger]!shemminger
7798b5237e Initial revision 2004-07-07 17:05:56 +00:00