*
* @APPLE_LICENSE_HEADER_START@
*
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License"). You may not use this file except in compliance with the
- * License. Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
*
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
masks[0] = (4 << 24) | (new_set << 16) | (rulenum);
bzero(&rule, sizeof(rule));
- rule.rulenum = masks[0];
+ rule.set_masks[0] = masks[0];
i = do_cmd(IP_FW_DEL, &rule, sizeof(rule));
} else if (!strncmp(*av, "move", strlen(*av))) {
masks[0] = (cmd << 24) | (new_set << 16) | (rulenum);
bzero(&rule, sizeof(rule));
- rule.rulenum = masks[0];
+ rule.set_masks[0] = masks[0];
i = do_cmd(IP_FW_DEL, &rule, sizeof(rule));
} else if (!strncmp(*av, "disable", strlen(*av)) ||
}
} else {
bzero(&rule, sizeof(rule));
- rule.rulenum = (i & 0xffff) | (do_set << 24);
+ if (do_set) {
+ rule.set_masks[0] = (i & 0xffff) | (do_set << 24);
+ }
+ else {
+ rule.rulenum = i;
+ }
i = do_cmd(IP_FW_DEL, &rule, sizeof(rule));
if (i) {
exitval = EX_UNAVAILABLE;