Changeset View
Changeset View
Standalone View
Standalone View
sys/netpfil/ipfw/ip_fw_sockopt.c
Show First 20 Lines • Show All 1,987 Lines • ▼ Show 20 Lines | #endif /* INET6 */ | ||||
case O_NGTEE: | case O_NGTEE: | ||||
if (ng_ipfw_input_p == NULL) | if (ng_ipfw_input_p == NULL) | ||||
return EINVAL; | return EINVAL; | ||||
else | else | ||||
goto check_size; | goto check_size; | ||||
case O_NAT: | case O_NAT: | ||||
if (!IPFW_NAT_LOADED) | if (!IPFW_NAT_LOADED) | ||||
return EINVAL; | return EINVAL; | ||||
if (cmdlen != F_INSN_SIZE(ipfw_insn_nat)) | /* temporary allow old ipfw binaries to send larger commands */ | ||||
if (cmdlen < F_INSN_SIZE(ipfw_insn)) | |||||
melifaro: You have to keep backward compatibility. Old and new ipfw(8) binaries have to work.
I guess you… | |||||
goto bad_size; | goto bad_size; | ||||
goto check_action; | goto check_action; | ||||
case O_CHECK_STATE: | case O_CHECK_STATE: | ||||
ci->object_opcodes++; | ci->object_opcodes++; | ||||
/* FALLTHROUGH */ | /* FALLTHROUGH */ | ||||
case O_FORWARD_MAC: /* XXX not implemented yet */ | case O_FORWARD_MAC: /* XXX not implemented yet */ | ||||
case O_COUNT: | case O_COUNT: | ||||
case O_ACCEPT: | case O_ACCEPT: | ||||
case O_DENY: | case O_DENY: | ||||
case O_REJECT: | case O_REJECT: | ||||
▲ Show 20 Lines • Show All 2,691 Lines • Show Last 20 Lines |
You have to keep backward compatibility. Old and new ipfw(8) binaries have to work.
I guess you can potentially accept both old & new opcode variations in the kernel, while changing ipfw(8) to use the new one, but this has to be verified.