{
fprintf(f,
"Usage: ... %-4s dev [ PHYS_DEV ] [ if_id IF-ID ]\n"
+ " [ external ]\n"
"\n"
"Where: IF-ID := { 0x1..0xffffffff }\n",
lu->id);
struct nlmsghdr *n)
{
unsigned int link = 0;
+ bool metadata = false;
__u32 if_id = 0;
while (argc > 0) {
invarg("if_id value is invalid", *argv);
else
addattr32(n, 1024, IFLA_XFRM_IF_ID, if_id);
+ } else if (!strcmp(*argv, "external")) {
+ metadata = true;
} else {
xfrm_print_help(lu, argc, argv, stderr);
return -1;
argc--; argv++;
}
+ if (metadata) {
+ if (if_id || link) {
+ fprintf(stderr, "xfrmi: both 'external' and if_id/link cannot be specified\n");
+ return -1;
+ }
+ addattr(n, 1024, IFLA_XFRM_COLLECT_METADATA);
+ return 0;
+ }
+
if (!if_id)
missarg("IF_ID");
if (!tb)
return;
+ if (tb[IFLA_XFRM_COLLECT_METADATA]) {
+ print_bool(PRINT_ANY, "external", "external ", true);
+ return;
+ }
+
if (tb[IFLA_XFRM_IF_ID]) {
__u32 id = rta_getattr_u32(tb[IFLA_XFRM_IF_ID]);
the following additional arguments are supported:
.BI "ip link add " DEVICE " type xfrm dev " PHYS_DEV " [ if_id " IF_ID " ]"
+.BR "[ external ]"
.in +8
.sp
policies. Policies must be configured with the same key. If not set, the key defaults to
0 and will match any policies which similarly do not have a lookup key configuration.
+.sp
+.BI external
+- make this device externally controlled. This flag is mutually exclusive with the
+.BR dev " and " if_id
+options.
+
.in -8
.TP