1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-26 07:55:01 +00:00

improve compatibility with RELENG_7.2

This commit is contained in:
Luigi Rizzo 2010-03-04 16:52:26 +00:00
parent 1009f2c9dd
commit 6aada3117b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204713

View File

@ -1212,6 +1212,13 @@ convert_rule_to_7(struct ip_fw *rule)
ccmdlen = F_LEN(ccmd);
bcopy(ccmd, dst, F_LEN(ccmd)*sizeof(uint32_t));
if (dst->opcode > O_NAT)
/* O_REASS doesn't exists in 7.2 version, so
* decrement opcode if it is after O_REASS
*/
dst->opcode--;
if (ccmdlen > ll) {
printf("ipfw: opcode %d size truncated\n",
ccmd->opcode);
@ -1246,6 +1253,13 @@ convert_rule_to_8(struct ip_fw *rule)
ccmdlen = F_LEN(ccmd);
bcopy(ccmd, dst, F_LEN(ccmd)*sizeof(uint32_t));
if (dst->opcode > O_NAT)
/* O_REASS doesn't exists in 7.2 version, so
* increment opcode if it is after O_REASS
*/
dst->opcode++;
if (ccmdlen > ll) {
printf("ipfw: opcode %d size truncated\n",
ccmd->opcode);