Clear out the entire range dedicated to firewall holes. */
| 2781 | |
| 2782 | /* Clear out the entire range dedicated to firewall holes. */ |
| 2783 | static void |
| 2784 | ClearAllFWHoles(struct libalias *la) |
| 2785 | { |
| 2786 | struct ip_fw rule; /* On-the-fly built rule */ |
| 2787 | int i; |
| 2788 | |
| 2789 | if (la->fireWallFD < 0) |
| 2790 | return; |
| 2791 | |
| 2792 | memset(&rule, 0, sizeof rule); |
| 2793 | for (i = la->fireWallBaseNum; i < la->fireWallBaseNum + la->fireWallNumNums; i++) { |
| 2794 | int r = i; |
| 2795 | |
| 2796 | while (!setsockopt(la->fireWallFD, IPPROTO_IP, IP_FW_DEL, &r, sizeof r)); |
| 2797 | } |
| 2798 | /* XXX: third arg correct here ? /phk */ |
| 2799 | memset(la->fireWallField, 0, la->fireWallNumNums); |
| 2800 | } |
| 2801 | |
| 2802 | #endif /* !NO_FW_PUNCH */ |
| 2803 |
no test coverage detected