MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ClearAllFWHoles

Function ClearAllFWHoles

freebsd/netinet/libalias/alias_db.c:2783–2800  ·  view source on GitHub ↗

Clear out the entire range dedicated to firewall holes. */

Source from the content-addressed store, hash-verified

2781
2782/* Clear out the entire range dedicated to firewall holes. */
2783static void
2784ClearAllFWHoles(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

Callers 2

InitPunchFWFunction · 0.85
UninitPunchFWFunction · 0.85

Calls 2

memsetFunction · 0.85
setsockoptFunction · 0.50

Tested by

no test coverage detected