| Summary: | IPFW tools: Parsing error in nat config port_range | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Andrey Linkevich <dl> | ||||
| Component: | bin | Assignee: | Lutz Donnerhacke <donner> | ||||
| Status: | New --- | ||||||
| Severity: | Affects Some People | CC: | aepot, donner | ||||
| Priority: | --- | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Thank you for reporting this issue. I wonder why the error occurs at all. Somebody should tested this during development. You don't need the checks for !ptr (which should have been written as ptr == NULL anyway), strtol() does not seem to set endptr to NULL ever. Also after applying the patch nat_show_cfg() doesn't display port_range by cmd: ipfw nat 1 show config But looks like the patch works regardless of a room for improvement there |
Created attachment 233165 [details] IPFW NAT config: port range parsing fix Hello, Colleagues. In ipfw error with parsing "ipfw nat 11 config port_range 1025-65535". Forever "You need a range of port(s) from 1024 <= x < 65536". Two errors in /usr/src/sbin/ipfw/nat.c nat_port_alias_parse(). Patch attached. Thanks.