| Summary: | add IP_FW_GETRULE to ipfw, in order to get single rules | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | alex <alex> | ||||||
| Component: | kern | Assignee: | Luigi Rizzo <luigi> | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Only Me | CC: | billf | ||||||
| Priority: | Normal | ||||||||
| Version: | 5.0-CURRENT | ||||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| Attachments: |
|
||||||||
|
Description
alex
2000-05-26 13:10:01 UTC
Thus spake alex@big.endian.de (alex@big.endian.de): > + if (!(fcp || fcp->rule)) { > + error = EINVAL; > + break; > + } Of _course_, that must be !(fcp && fcp->rule) (urks, boolean logic...) Alex -- I need a new ~/.sig. State Changed From-To: open->feedback There are a couple problems I have with it. The big problem is that you don't copy the entire chain of a specific rule number out, but only the very first one. Responsible Changed From-To: freebsd-bugs->luigi i am working on the code... but the proposed patch is not general enough, as you can have multiple rules with the same number, and the proposed patch does not support well that case. State Changed From-To: feedback->closed The more i think of it, the more i find it unnecessary to grab single ipfw rules from the kernel. This can be done very easily in userland (ipfw|grep) and besides the proposed patch does not work when there are multiple rules with the same rule number. |