Hello community,
here is the log from the commit of package iproute2 for openSUSE:Factory
checked in at Thu Mar 24 09:37:09 CET 2011.
--------
--- iproute2/iproute2.changes 2011-01-12 17:03:48.000000000 +0100
+++ /mounts/work_src_done/STABLE/iproute2/iproute2.changes 2011-03-23 19:59:21.000000000 +0100
@@ -1,0 +2,21 @@
+Wed Mar 23 18:57:20 UTC 2011 - bphilips@novell.com
+
+Remove unneeded patches:
+* iproute2-warnings.diff bnc#34714
+ Warnings no longer exist
+* iproute2-iptunnel-fclose.diff
+ Process is dying no need to close file pointers
+* iproute2-ss-pclose.diff
+ Process is dying no need to close file pointers
+* iproute2-flushcheckuid.diff
+ Fixed upstream
+* iproute2-skbedit-memset.diff
+ Fixed upstream 46a6573259f46f86eb0048a2c805b24ff4183fa6
+
+-------------------------------------------------------------------
+Tue Mar 22 08:57:44 CET 2011 - ms@suse.de
+
+- Update to 2.6.38, fix for options process with ipt (bnc #679172)
+- tidy up the package, spec file names, patch names, etc
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
iproute2-2.6.29-1-HZ.diff
iproute2-2.6.29-1-flushcheckuid.diff
iproute2-2.6.29-1-iptunnel-fclose.diff
iproute2-2.6.29-1-libdir-1.diff
iproute2-2.6.29-1-memleak.diff
iproute2-2.6.29-1-pdfdoc.diff
iproute2-2.6.29-1-skbedit-memset.diff
iproute2-2.6.29-1-ss-pclose.diff
iproute2-2.6.29-1-warnings.diff
iproute2-2.6.37-rtt-metrics-units.diff
iproute2-2.6.37.tar.bz2
New:
----
iproute2-2.6.38.tar.bz2
iproute2-HZ.diff
iproute2-libdir-1.diff
iproute2-memleak.diff
iproute2-pdfdoc.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ iproute2.spec ++++++
--- /var/tmp/diff_new_pack.JeKh2A/_old 2011-03-24 09:35:29.000000000 +0100
+++ /var/tmp/diff_new_pack.JeKh2A/_new 2011-03-24 09:35:29.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package iproute2 (Version 2.6.37)
+# spec file for package iproute2
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -24,22 +24,16 @@
License: GPLv2+
Group: Productivity/Networking/Routing
Provides: iproute
-Version: 2.6.37
+Version: 2.6.38
Release: 1
-%define rversion 2.6.37
+%define rversion 2.6.38
Summary: Advanced Routing
-Url: http://developer.osdl.org/dev/iproute2/
+Url: http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
Source0: %name-%rversion.tar.bz2
-Patch0: %name-2.6.29-1-libdir-1.diff
-Patch1: %name-2.6.29-1-HZ.diff
-Patch2: %name-2.6.29-1-pdfdoc.diff
-Patch5: %name-2.6.29-1-flushcheckuid.diff
-Patch7: %name-2.6.29-1-warnings.diff
-Patch8: %name-2.6.29-1-skbedit-memset.diff
-Patch9: %name-2.6.29-1-iptunnel-fclose.diff
-Patch10: %name-2.6.29-1-ss-pclose.diff
-Patch13: %name-2.6.29-1-memleak.diff
-Patch14: %name-2.6.37-rtt-metrics-units.diff
+Patch0: %name-libdir-1.diff
+Patch1: %name-HZ.diff
+Patch2: %name-pdfdoc.diff
+Patch3: %name-memleak.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -79,13 +73,7 @@
%patch0
%patch1
%patch2
-%patch5
-%patch7
-%patch8
-%patch9
-%patch10
-%patch13
-%patch14 -p1
+%patch3
find . -name *.orig -print0 | xargs -r0 rm -v
%build
++++++ iproute2-2.6.37.tar.bz2 -> iproute2-2.6.38.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/include/SNAPSHOT.h new/iproute2-2.6.38/include/SNAPSHOT.h
--- old/iproute2-2.6.37/include/SNAPSHOT.h 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/include/SNAPSHOT.h 2011-03-17 18:05:47.000000000 +0100
@@ -1 +1 @@
-static const char SNAPSHOT[] = "110107";
+static const char SNAPSHOT[] = "110317";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/include/linux/if_ether.h new/iproute2-2.6.38/include/linux/if_ether.h
--- old/iproute2-2.6.37/include/linux/if_ether.h 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/include/linux/if_ether.h 2011-03-17 18:05:47.000000000 +0100
@@ -72,6 +72,7 @@
#define ETH_P_MPLS_UC 0x8847 /* MPLS Unicast traffic */
#define ETH_P_MPLS_MC 0x8848 /* MPLS Multicast traffic */
#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */
+#define ETH_P_LINK_CTL 0x886c /* HPNA, wlan link local tunnel */
#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport
* over Ethernet
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/include/linux/if_link.h new/iproute2-2.6.38/include/linux/if_link.h
--- old/iproute2-2.6.37/include/linux/if_link.h 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/include/linux/if_link.h 2011-03-17 18:05:47.000000000 +0100
@@ -80,6 +80,24 @@
__u8 port;
};
+/*
+ * IFLA_AF_SPEC
+ * Contains nested attributes for address family specific attributes.
+ * Each address family may create a attribute with the address family
+ * number as type and create its own attribute structure in it.
+ *
+ * Example:
+ * [IFLA_AF_SPEC] = {
+ * [AF_INET] = {
+ * [IFLA_INET_CONF] = ...,
+ * },
+ * [AF_INET6] = {
+ * [IFLA_INET6_FLAGS] = ...,
+ * [IFLA_INET6_CONF] = ...,
+ * }
+ * }
+ */
+
enum {
IFLA_UNSPEC,
IFLA_ADDRESS,
@@ -116,6 +134,7 @@
IFLA_STATS64,
IFLA_VF_PORTS,
IFLA_PORT_SELF,
+ IFLA_AF_SPEC,
__IFLA_MAX
};
@@ -126,6 +145,14 @@
#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
+enum {
+ IFLA_INET_UNSPEC,
+ IFLA_INET_CONF,
+ __IFLA_INET_MAX,
+};
+
+#define IFLA_INET_MAX (__IFLA_INET_MAX - 1)
+
/* ifi_flags.
IFF_* flags.
@@ -230,6 +257,7 @@
MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */
MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */
MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */
+ MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */
};
/* SR-IOV virtual function management section */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/include/linux/netfilter.h new/iproute2-2.6.38/include/linux/netfilter.h
--- old/iproute2-2.6.37/include/linux/netfilter.h 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/include/linux/netfilter.h 2011-03-17 18:05:47.000000000 +0100
@@ -23,6 +23,8 @@
#define NF_QUEUE_NR(x) ((((x) << NF_VERDICT_BITS) & NF_VERDICT_QMASK) | NF_QUEUE)
+#define NF_DROP_ERR(x) (((-x) << NF_VERDICT_BITS) | NF_DROP)
+
/* only for userspace compatibility */
/* Generic cache responses from hook functions.
<= 0x2000 is used for protocol-flags. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/include/linux/xfrm.h new/iproute2-2.6.38/include/linux/xfrm.h
--- old/iproute2-2.6.37/include/linux/xfrm.h 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/include/linux/xfrm.h 2011-03-17 18:05:47.000000000 +0100
@@ -283,6 +283,7 @@
XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */
XFRMA_ALG_AUTH_TRUNC, /* struct xfrm_algo_auth */
XFRMA_MARK, /* struct xfrm_mark */
+ XFRMA_TFCPAD, /* __u32 */
__XFRMA_MAX
#define XFRMA_MAX (__XFRMA_MAX - 1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/include/utils.h new/iproute2-2.6.38/include/utils.h
--- old/iproute2-2.6.37/include/utils.h 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/include/utils.h 2011-03-17 18:05:47.000000000 +0100
@@ -79,7 +79,7 @@
extern int get_integer(int *val, const char *arg, int base);
extern int get_unsigned(unsigned *val, const char *arg, int base);
-extern int get_jiffies(unsigned *val, const char *arg, int base, int *raw);
+extern int get_time_rtt(unsigned *val, const char *arg, int *raw);
#define get_byte get_u8
#define get_ushort get_u16
#define get_short get_s16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/ip/iplink_macvlan.c new/iproute2-2.6.38/ip/iplink_macvlan.c
--- old/iproute2-2.6.37/ip/iplink_macvlan.c 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/ip/iplink_macvlan.c 2011-03-17 18:05:47.000000000 +0100
@@ -23,14 +23,14 @@
static void explain(void)
{
fprintf(stderr,
- "Usage: ... macvlan mode { private | vepa | bridge }\n"
+ "Usage: ... macvlan mode { private | vepa | bridge | passthru }\n"
);
}
static int mode_arg(void)
{
fprintf(stderr, "Error: argument of \"mode\" must be \"private\", "
- "\"vepa\" or \"bridge\"\n");
+ "\"vepa\", \"bridge\" or \"passthru\" \n");
return -1;
}
@@ -48,6 +48,8 @@
mode = MACVLAN_MODE_VEPA;
else if (strcmp(*argv, "bridge") == 0)
mode = MACVLAN_MODE_BRIDGE;
+ else if (strcmp(*argv, "passthru") == 0)
+ mode = MACVLAN_MODE_PASSTHRU;
else
return mode_arg();
@@ -82,6 +84,7 @@
mode == MACVLAN_MODE_PRIVATE ? "private"
: mode == MACVLAN_MODE_VEPA ? "vepa"
: mode == MACVLAN_MODE_BRIDGE ? "bridge"
+ : mode == MACVLAN_MODE_PASSTHRU ? "passthru"
: "unknown");
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/ip/iplink_macvtap.c new/iproute2-2.6.38/ip/iplink_macvtap.c
--- old/iproute2-2.6.37/ip/iplink_macvtap.c 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/ip/iplink_macvtap.c 2011-03-17 18:05:47.000000000 +0100
@@ -20,14 +20,14 @@
static void explain(void)
{
fprintf(stderr,
- "Usage: ... macvtap mode { private | vepa | bridge }\n"
+ "Usage: ... macvtap mode { private | vepa | bridge | passthru }\n"
);
}
static int mode_arg(void)
{
fprintf(stderr, "Error: argument of \"mode\" must be \"private\", "
- "\"vepa\" or \"bridge\"\n");
+ "\"vepa\", \"bridge\" or \"passthru\" \n");
return -1;
}
@@ -45,6 +45,8 @@
mode = MACVLAN_MODE_VEPA;
else if (strcmp(*argv, "bridge") == 0)
mode = MACVLAN_MODE_BRIDGE;
+ else if (strcmp(*argv, "passthru") == 0)
+ mode = MACVLAN_MODE_PASSTHRU;
else
return mode_arg();
@@ -79,6 +81,7 @@
mode == MACVLAN_MODE_PRIVATE ? "private"
: mode == MACVLAN_MODE_VEPA ? "vepa"
: mode == MACVLAN_MODE_BRIDGE ? "bridge"
+ : mode == MACVLAN_MODE_PASSTHRU ? "passthru"
: "unknown");
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/ip/iproute.c new/iproute2-2.6.38/ip/iproute.c
--- old/iproute2-2.6.37/ip/iproute.c 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/ip/iproute.c 2011-03-17 18:05:47.000000000 +0100
@@ -85,7 +85,7 @@
fprintf(stderr, "MP_ALGO := { rr | drr | random | wrandom }\n");
fprintf(stderr, "NHFLAGS := [ onlink | pervasive ]\n");
fprintf(stderr, "RTPROTO := [ kernel | boot | static | NUMBER ]\n");
- fprintf(stderr, "TIME := NUMBER[s|ms|us|ns|j]\n");
+ fprintf(stderr, "TIME := NUMBER[s|ms]\n");
exit(-1);
}
@@ -526,8 +526,6 @@
if (mxrta[i] == NULL)
continue;
- if (!hz)
- hz = get_user_hz();
if (i < sizeof(mx_names)/sizeof(char*) && mx_names[i])
fprintf(fp, " %s", mx_names[i]);
@@ -549,18 +547,15 @@
case RTAX_RTT:
case RTAX_RTTVAR:
case RTAX_RTO_MIN:
- val *= 1000;
if (i == RTAX_RTT)
val /= 8;
else if (i == RTAX_RTTVAR)
val /= 4;
- if (val >= hz)
- fprintf(fp, " %llums",
- (unsigned long long) val / hz);
+ if (val >= 1000)
+ fprintf(fp, " %gs", val/1e3);
else
- fprintf(fp, " %.2fms",
- (double)val / hz);
+ fprintf(fp, " %ums", val);
}
}
}
@@ -840,7 +835,7 @@
mxlock |= (1<alg_key_len / 8];
+ } base;
+
+ memcpy(base.algo.alg_name, algo->alg_name, sizeof(base.algo.alg_name));
+ base.algo.alg_key_len = algo->alg_key_len;
+ memcpy(base.algo.alg_key, algo->alg_key, algo->alg_key_len / 8);
+
+ __xfrm_algo_print(&base.algo, XFRMA_ALG_AUTH_TRUNC, len, fp, prefix, 0);
+
+ fprintf(fp, " %d", algo->alg_trunc_len);
+
+ fprintf(fp, "%s", _SL_);
+}
+
static void xfrm_tmpl_print(struct xfrm_user_tmpl *tmpls, int len,
__u16 family, FILE *fp, const char *prefix)
{
@@ -677,12 +697,18 @@
fprintf(fp, "\tmark %d/0x%x\n", m->v, m->m);
}
- if (tb[XFRMA_ALG_AUTH]) {
+ if (tb[XFRMA_ALG_AUTH] && !tb[XFRMA_ALG_AUTH_TRUNC]) {
struct rtattr *rta = tb[XFRMA_ALG_AUTH];
xfrm_algo_print((struct xfrm_algo *) RTA_DATA(rta),
XFRMA_ALG_AUTH, RTA_PAYLOAD(rta), fp, prefix);
}
+ if (tb[XFRMA_ALG_AUTH_TRUNC]) {
+ struct rtattr *rta = tb[XFRMA_ALG_AUTH_TRUNC];
+ xfrm_auth_trunc_print((struct xfrm_algo_auth *) RTA_DATA(rta),
+ RTA_PAYLOAD(rta), fp, prefix);
+ }
+
if (tb[XFRMA_ALG_AEAD]) {
struct rtattr *rta = tb[XFRMA_ALG_AEAD];
xfrm_aead_print((struct xfrm_algo_aead *)RTA_DATA(rta),
@@ -850,6 +876,20 @@
xfrm_lifetime_print(&xsinfo->lft, &xsinfo->curlft, fp, buf);
xfrm_stats_print(&xsinfo->stats, fp, buf);
}
+
+ if (tb[XFRMA_SEC_CTX]) {
+ struct xfrm_user_sec_ctx *sctx;
+
+ fprintf(fp, "\tsecurity context ");
+
+ if (RTA_PAYLOAD(tb[XFRMA_SEC_CTX]) < sizeof(*sctx))
+ fprintf(fp, "(ERROR truncated)");
+
+ sctx = (struct xfrm_user_sec_ctx *)RTA_DATA(tb[XFRMA_SEC_CTX]);
+
+ fprintf(fp, "%s %s", (char *)(sctx + 1), _SL_);
+ }
+
}
void xfrm_policy_info_print(struct xfrm_userpolicy_info *xpinfo,
@@ -862,6 +902,20 @@
xfrm_selector_print(&xpinfo->sel, preferred_family, fp, title);
+ if (tb[XFRMA_SEC_CTX]) {
+ struct xfrm_user_sec_ctx *sctx;
+
+ fprintf(fp, "\tsecurity context ");
+
+ if (RTA_PAYLOAD(tb[XFRMA_SEC_CTX]) < sizeof(*sctx))
+ fprintf(fp, "(ERROR truncated)");
+
+ sctx = (struct xfrm_user_sec_ctx *)RTA_DATA(tb[XFRMA_SEC_CTX]);
+
+ fprintf(fp, "%s ", (char *)(sctx + 1));
+ fprintf(fp, "%s", _SL_);
+ }
+
if (prefix)
STRBUF_CAT(buf, prefix);
STRBUF_CAT(buf, "\t");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/ip/xfrm.h new/iproute2-2.6.38/ip/xfrm.h
--- old/iproute2-2.6.37/ip/xfrm.h 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/ip/xfrm.h 2011-03-17 18:05:47.000000000 +0100
@@ -154,5 +154,6 @@
int xfrm_selector_parse(struct xfrm_selector *sel, int *argcp, char ***argvp);
int xfrm_lifetime_cfg_parse(struct xfrm_lifetime_cfg *lft,
int *argcp, char ***argvp);
-
+int xfrm_sctx_parse(char *ctxstr, char *context,
+ struct xfrm_user_sec_ctx *sctx);
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/ip/xfrm_policy.c new/iproute2-2.6.38/ip/xfrm_policy.c
--- old/iproute2-2.6.37/ip/xfrm_policy.c 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/ip/xfrm_policy.c 2011-03-17 18:05:47.000000000 +0100
@@ -48,14 +48,15 @@
#define NLMSG_BUF_SIZE 4096
#define RTA_BUF_SIZE 2048
#define XFRM_TMPLS_BUF_SIZE 1024
+#define CTX_BUF_SIZE 256
static void usage(void) __attribute__((noreturn));
static void usage(void)
{
- fprintf(stderr, "Usage: ip xfrm policy { add | update } dir DIR SELECTOR [ index INDEX ] [ ptype PTYPE ]\n");
+ fprintf(stderr, "Usage: ip xfrm policy { add | update } dir DIR SELECTOR [ ctx SEC_CTX ][ index INDEX ] [ ptype PTYPE ]\n");
fprintf(stderr, " [ action ACTION ] [ priority PRIORITY ] [ flag FLAG-LIST ] [ LIMIT-LIST ] [ TMPL-LIST ] [mark MARK [mask MASK]]\n");
- fprintf(stderr, "Usage: ip xfrm policy { delete | get } dir DIR [ SELECTOR | index INDEX ] [ ptype PTYPE ] [mark MARK [mask MASK]]\n");
+ fprintf(stderr, "Usage: ip xfrm policy { delete | get } dir DIR [ SELECTOR | index INDEX ] [ ctx SEC_CTX ][ ptype PTYPE ] [mark MARK [mask MASK]]\n");
fprintf(stderr, "Usage: ip xfrm policy { deleteall | list } [ dir DIR ] [ SELECTOR ]\n");
fprintf(stderr, " [ index INDEX ] [ action ACTION ] [ priority PRIORITY ] [ flag FLAG-LIST ]\n");
fprintf(stderr, "Usage: ip xfrm policy flush [ ptype PTYPE ]\n");
@@ -222,6 +223,23 @@
return 0;
}
+int xfrm_sctx_parse(char *ctxstr, char *s,
+ struct xfrm_user_sec_ctx *sctx)
+{
+ int slen;
+
+ slen = strlen(s) + 1;
+
+ sctx->exttype = XFRMA_SEC_CTX;
+ sctx->ctx_doi = 1;
+ sctx->ctx_alg = 1;
+ sctx->ctx_len = slen;
+ sctx->len = sizeof(struct xfrm_user_sec_ctx) + slen;
+ memcpy(ctxstr, s, slen);
+
+ return 0;
+}
+
static int xfrm_policy_modify(int cmd, unsigned flags, int argc, char **argv)
{
struct rtnl_handle rth;
@@ -233,14 +251,20 @@
char *dirp = NULL;
char *selp = NULL;
char *ptypep = NULL;
+ char *sctxp = NULL;
struct xfrm_userpolicy_type upt;
char tmpls_buf[XFRM_TMPLS_BUF_SIZE];
int tmpls_len = 0;
struct xfrm_mark mark = {0, 0};
+ struct {
+ struct xfrm_user_sec_ctx sctx;
+ char str[CTX_BUF_SIZE];
+ } ctx;
memset(&req, 0, sizeof(req));
memset(&upt, 0, sizeof(upt));
memset(&tmpls_buf, 0, sizeof(tmpls_buf));
+ memset(&ctx, 0, sizeof(ctx));
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xpinfo));
req.n.nlmsg_flags = NLM_F_REQUEST|flags;
@@ -260,6 +284,15 @@
NEXT_ARG();
xfrm_policy_dir_parse(&req.xpinfo.dir, &argc, &argv);
+ } else if (strcmp(*argv, "ctx") == 0) {
+ char *context;
+
+ if (sctxp)
+ duparg("ctx", *argv);
+ sctxp = *argv;
+ NEXT_ARG();
+ context = *argv;
+ xfrm_sctx_parse((char *)&ctx.str, context, &ctx.sctx);
} else if (strcmp(*argv, "mark") == 0) {
xfrm_parse_mark(&mark, &argc, &argv);
} else if (strcmp(*argv, "index") == 0) {
@@ -347,6 +380,10 @@
}
}
+ if (sctxp) {
+ addattr_l(&req.n, sizeof(req), XFRMA_SEC_CTX,
+ (void *)&ctx, ctx.sctx.len);
+ }
if (rtnl_open_byproto(&rth, 0, NETLINK_XFRM) < 0)
exit(1);
@@ -528,11 +565,18 @@
char *selp = NULL;
char *indexp = NULL;
char *ptypep = NULL;
+ char *sctxp = NULL;
struct xfrm_userpolicy_type upt;
struct xfrm_mark mark = {0, 0};
+ struct {
+ struct xfrm_user_sec_ctx sctx;
+ char str[CTX_BUF_SIZE];
+ } ctx;
+
memset(&req, 0, sizeof(req));
memset(&upt, 0, sizeof(upt));
+ memset(&ctx, 0, sizeof(ctx));
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xpid));
req.n.nlmsg_flags = NLM_F_REQUEST;
@@ -547,6 +591,15 @@
NEXT_ARG();
xfrm_policy_dir_parse(&req.xpid.dir, &argc, &argv);
+ } else if (strcmp(*argv, "ctx") == 0) {
+ char *context;
+
+ if (sctxp)
+ duparg("ctx", *argv);
+ sctxp = *argv;
+ NEXT_ARG();
+ context = *argv;
+ xfrm_sctx_parse((char *)&ctx.str, context, &ctx.sctx);
} else if (strcmp(*argv, "mark") == 0) {
xfrm_parse_mark(&mark, &argc, &argv);
} else if (strcmp(*argv, "index") == 0) {
@@ -610,6 +663,11 @@
}
}
+ if (sctxp) {
+ addattr_l(&req.n, sizeof(req), XFRMA_SEC_CTX,
+ (void *)&ctx, ctx.sctx.len);
+ }
+
if (rtnl_talk(&rth, &req.n, 0, 0, res_nlbuf, NULL, NULL) < 0)
exit(2);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/ip/xfrm_state.c new/iproute2-2.6.38/ip/xfrm_state.c
--- old/iproute2-2.6.37/ip/xfrm_state.c 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/ip/xfrm_state.c 2011-03-17 18:05:47.000000000 +0100
@@ -50,12 +50,13 @@
#define NLMSG_BUF_SIZE 4096
#define RTA_BUF_SIZE 2048
#define XFRM_ALGO_KEY_BUF_SIZE 512
+#define CTX_BUF_SIZE 256
static void usage(void) __attribute__((noreturn));
static void usage(void)
{
- fprintf(stderr, "Usage: ip xfrm state { add | update } ID [ XFRM_OPT ] [ mode MODE ]\n");
+ fprintf(stderr, "Usage: ip xfrm state { add | update } ID [ XFRM_OPT ] [ ctx SEC_CTX ] [ mode MODE ]\n");
fprintf(stderr, " [ reqid REQID ] [ seq SEQ ] [ replay-window SIZE ] [ flag FLAG-LIST ]\n");
fprintf(stderr, " [ encap ENCAP ] [ sel SELECTOR ] [ replay-seq SEQ ]\n");
fprintf(stderr, " [ replay-oseq SEQ ] [ LIMIT-LIST ]\n");
@@ -90,11 +91,12 @@
fprintf(stderr, "ALGO-LIST := [ ALGO-LIST ] | [ ALGO ]\n");
fprintf(stderr, "ALGO := ALGO_TYPE ALGO_NAME ALGO_KEY "
- "[ ALGO_ICV_LEN ]\n");
+ "[ ALGO_ICV_LEN | ALGO_TRUNC_LEN ]\n");
fprintf(stderr, "ALGO_TYPE := [ ");
fprintf(stderr, "%s | ", strxf_algotype(XFRMA_ALG_AEAD));
fprintf(stderr, "%s | ", strxf_algotype(XFRMA_ALG_CRYPT));
fprintf(stderr, "%s | ", strxf_algotype(XFRMA_ALG_AUTH));
+ fprintf(stderr, "%s | ", strxf_algotype(XFRMA_ALG_AUTH_TRUNC));
fprintf(stderr, "%s ", strxf_algotype(XFRMA_ALG_COMP));
fprintf(stderr, "]\n");
@@ -246,10 +248,16 @@
char *aalgop = NULL;
char *calgop = NULL;
char *coap = NULL;
+ char *sctxp = NULL;
struct xfrm_mark mark = {0, 0};
+ struct {
+ struct xfrm_user_sec_ctx sctx;
+ char str[CTX_BUF_SIZE];
+ } ctx;
memset(&req, 0, sizeof(req));
memset(&replay, 0, sizeof(replay));
+ memset(&ctx, 0, sizeof(ctx));
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xsinfo));
req.n.nlmsg_flags = NLM_F_REQUEST|flags;
@@ -333,6 +341,19 @@
addattr_l(&req.n, sizeof(req.buf), XFRMA_COADDR,
(void *)&xcoa, sizeof(xcoa));
+ } else if (strcmp(*argv, "ctx") == 0) {
+ char *context;
+
+ if (sctxp)
+ duparg("ctx", *argv);
+ sctxp = *argv;
+
+ NEXT_ARG();
+ context = *argv;
+
+ xfrm_sctx_parse((char *)&ctx.str, context, &ctx.sctx);
+ addattr_l(&req.n, sizeof(req.buf), XFRMA_SEC_CTX,
+ (void *)&ctx, ctx.sctx.len);
} else {
/* try to assume ALGO */
int type = xfrm_algotype_getbyname(*argv);
@@ -340,6 +361,7 @@
case XFRMA_ALG_AEAD:
case XFRMA_ALG_CRYPT:
case XFRMA_ALG_AUTH:
+ case XFRMA_ALG_AUTH_TRUNC:
case XFRMA_ALG_COMP:
{
/* ALGO */
@@ -347,11 +369,12 @@
union {
struct xfrm_algo alg;
struct xfrm_algo_aead aead;
+ struct xfrm_algo_auth auth;
} u;
char buf[XFRM_ALGO_KEY_BUF_SIZE];
} alg = {};
int len;
- __u32 icvlen;
+ __u32 icvlen, trunclen;
char *name;
char *key;
char *buf;
@@ -368,6 +391,7 @@
ealgop = *argv;
break;
case XFRMA_ALG_AUTH:
+ case XFRMA_ALG_AUTH_TRUNC:
if (aalgop)
duparg("ALGOTYPE", *argv);
aalgop = *argv;
@@ -395,21 +419,33 @@
buf = alg.u.alg.alg_key;
len = sizeof(alg.u.alg);
- if (type != XFRMA_ALG_AEAD)
- goto parse_algo;
+ switch (type) {
+ case XFRMA_ALG_AEAD:
+ if (!NEXT_ARG_OK())
+ missarg("ALGOICVLEN");
+ NEXT_ARG();
+ if (get_u32(&icvlen, *argv, 0))
+ invarg("\"aead\" ICV length is invalid",
+ *argv);
+ alg.u.aead.alg_icv_len = icvlen;
- if (!NEXT_ARG_OK())
- missarg("ALGOICVLEN");
- NEXT_ARG();
- if (get_u32(&icvlen, *argv, 0))
- invarg("\"aead\" ICV length is invalid",
- *argv);
- alg.u.aead.alg_icv_len = icvlen;
+ buf = alg.u.aead.alg_key;
+ len = sizeof(alg.u.aead);
+ break;
+ case XFRMA_ALG_AUTH_TRUNC:
+ if (!NEXT_ARG_OK())
+ missarg("ALGOTRUNCLEN");
+ NEXT_ARG();
+ if (get_u32(&trunclen, *argv, 0))
+ invarg("\"auth\" trunc length is invalid",
+ *argv);
+ alg.u.auth.alg_trunc_len = trunclen;
- buf = alg.u.aead.alg_key;
- len = sizeof(alg.u.aead);
+ buf = alg.u.auth.alg_key;
+ len = sizeof(alg.u.auth);
+ break;
+ }
-parse_algo:
xfrm_algo_parse((void *)&alg, type, name, key,
buf, sizeof(alg.buf));
len += alg.u.alg.alg_key_len;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/lib/utils.c new/iproute2-2.6.38/lib/utils.c
--- old/iproute2-2.6.37/lib/utils.c 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/lib/utils.c 2011-03-17 18:05:47.000000000 +0100
@@ -93,14 +93,13 @@
}
/*
- * get_jiffies is "translated" from a similar routine "get_time" in
- * tc_util.c. we don't use the exact same routine because tc passes
- * microseconds to the kernel and the callers of get_jiffies want
- * to pass jiffies, and have a different assumption for the units of
- * a "raw" number.
+ * get_time_rtt is "translated" from a similar routine "get_time" in
+ * tc_util.c. We don't use the exact same routine because tc passes
+ * microseconds to the kernel and the callers of get_time_rtt want to
+ * pass milliseconds (standard unit for rtt values since 2.6.27), and
+ * have a different assumption for the units of a "raw" number.
*/
-
-int get_jiffies(unsigned *jiffies, const char *arg, int base, int *raw)
+int get_time_rtt(unsigned *val, const char *arg, int *raw)
{
double t;
unsigned long res;
@@ -112,35 +111,22 @@
return -1;
}
else {
- res = strtoul(arg,&p,base);
+ res = strtoul(arg, &p, 0);
if (res > UINT_MAX)
return -1;
t = (double)res;
}
if (p == arg)
return -1;
-
- if (__iproute2_hz_internal == 0)
- __iproute2_hz_internal = __get_hz();
-
*raw = 1;
if (*p) {
*raw = 0;
if (strcasecmp(p, "s") == 0 || strcasecmp(p, "sec")==0 ||
strcasecmp(p, "secs")==0)
- t *= __iproute2_hz_internal;
+ t *= 1000;
else if (strcasecmp(p, "ms") == 0 || strcasecmp(p, "msec")==0 ||
strcasecmp(p, "msecs") == 0)
- t *= __iproute2_hz_internal/1000.0;
- else if (strcasecmp(p, "us") == 0 || strcasecmp(p, "usec")==0 ||
- strcasecmp(p, "usecs") == 0)
- t *= __iproute2_hz_internal/1000000.0;
- else if (strcasecmp(p, "ns") == 0 || strcasecmp(p, "nsec")==0 ||
- strcasecmp(p, "nsecs") == 0)
- t *= __iproute2_hz_internal/1000000000.0;
- else if (strcasecmp(p, "j") == 0 || strcasecmp(p, "hz") == 0 ||
- strcasecmp(p,"jiffies") == 0)
t *= 1.0; /* allow suffix, do nothing */
else
return -1;
@@ -148,9 +134,9 @@
/* emulate ceil() without having to bring-in -lm and always be >= 1 */
- *jiffies = t;
- if (*jiffies < t)
- *jiffies += 1;
+ *val = t;
+ if (*val < t)
+ *val += 1;
return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iproute2-2.6.37/man/man8/ip.8 new/iproute2-2.6.38/man/man8/ip.8
--- old/iproute2-2.6.37/man/man8/ip.8 2011-01-07 18:54:30.000000000 +0100
+++ new/iproute2-2.6.38/man/man8/ip.8 2011-03-17 18:05:47.000000000 +0100
@@ -42,7 +42,7 @@
.RB "[ " mtu
.IR MTU " ]"
.br
-.BR type TYPE
+.BR type " TYPE"
.RI "[ " ARGS " ]"
.ti -8
@@ -51,7 +51,7 @@
.ti -8
.BI "ip link delete " DEVICE
-.BI type TYPE
+.BI type " TYPE"
.RI "[ " ARGS " ]"
.ti -8
@@ -391,7 +391,7 @@
.IR KEY " := { " DOTTED_QUAD " | " NUMBER " }"
.ti -8
-.IR TIME " := " NUMBER "[s|ms|us|ns|j]"
+.IR TIME " := " NUMBER "[s|ms]"
.ti -8
.BR "ip maddr" " [ " add " | " del " ]"
@@ -1616,10 +1616,7 @@
specified the units are raw values passed directly to the
routing code to maintain compatibility with previous releases.
Otherwise if a suffix of s, sec or secs is used to specify
-seconds; ms, msec or msecs to specify milliseconds; us, usec
-or usecs to specify microseconds; ns, nsec or nsecs to specify
-nanoseconds; j, hz or jiffies to specify jiffies, the value is
-converted to what the routing code expects.
+seconds and ms, msec or msecs to specify milliseconds.
.TP
++++++ iproute2-2.6.29-1-HZ.diff -> iproute2-HZ.diff ++++++
++++++ iproute2-2.6.29-1-libdir-1.diff -> iproute2-libdir-1.diff ++++++
++++++ iproute2-2.6.29-1-memleak.diff -> iproute2-memleak.diff ++++++
++++++ iproute2-2.6.29-1-pdfdoc.diff -> iproute2-pdfdoc.diff ++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org