" names: hop,dst,route,frag,auth,esp,none,proto\n"
" long names: hop-by-hop,ipv6-opts,ipv6-route,\n"
" ipv6-frag,ah,esp,ipv6-nonxt,protocol\n"
-" numbers: 0,60,43,44,51,50,59\n",
+" numbers: 0,60,43,44,51,50,59\n"
+"--soft The header CONTAINS the specified extensions\n",
NETFILTER_VERSION);
}
static struct option opts[] = {
{ "header", 1, 0, '1' },
+ { "soft", 0, 0, '2' },
{ 0 }
};
info->matchflags = 0x00;
info->invflags = 0x00;
+ info->modeflag = 0x00;
/* No caching (yet) */
*nfcache |= NFC_UNKNOWN;
}
return ret;
}
-#define IPV6_HDR_HEADER 0x01
+#define IPV6_HDR_HEADER 0x01
+#define IPV6_HDR_SOFT 0x02
/* Parses command options; returns 0 if it ate an option */
static int
exit_error(PARAMETER_PROBLEM, "ip6t_ipv6header: cannot parse header names");
if (invert)
- info->invflags |= 255;
-
+ info->invflags |= 0xFF;
*flags |= IPV6_HDR_HEADER;
+ break;
+ case '2' :
+ /* Soft-mode requested? */
+ if (*flags & IPV6_HDR_SOFT)
+ exit_error(PARAMETER_PROBLEM,
+ "Only one `--soft' allowed");
+ info->modeflag |= 0xFF;
+ *flags |= IPV6_HDR_SOFT;
break;
default:
return 0;
}
}
+ if (info->modeflag)
+ printf("soft ");
+
return;
}
printf("%s", info->invflags ? "!" : "");
print_header(info->matchflags);
printf(" ");
+ if (info->modeflag)
+ printf("--soft ");
return;
}