View | Details | Raw Unified | Return to bug 18830 | Differences between
and this patch

Collapse All | Expand All

(-)in.h (+1 lines)
Lines 337-342 Link Here
337
#define	IP_FW_ZERO    		53   /* clear single/all firewall counter(s) */
337
#define	IP_FW_ZERO    		53   /* clear single/all firewall counter(s) */
338
#define	IP_FW_GET     		54   /* get entire firewall rule chain */
338
#define	IP_FW_GET     		54   /* get entire firewall rule chain */
339
#define	IP_FW_RESETLOG		55   /* reset logging counters */
339
#define	IP_FW_RESETLOG		55   /* reset logging counters */
340
#define	IP_FW_GETRULE		56   /* get a single rule */
340
341
341
#define	IP_DUMMYNET_CONFIGURE	60   /* add/configure a dummynet pipe */
342
#define	IP_DUMMYNET_CONFIGURE	60   /* add/configure a dummynet pipe */
342
#define	IP_DUMMYNET_DEL		61   /* delete a dummynet pipe from chain */
343
#define	IP_DUMMYNET_DEL		61   /* delete a dummynet pipe from chain */
(-)ip_fw.c (+17 lines)
Lines 1818-1823 Link Here
1818
		}
1818
		}
1819
		break;
1819
		break;
1820
1820
1821
	case IP_FW_GETRULE:
1822
		error = sooptcopyin(sopt, &frwl, sizeof frwl, sizeof frwl);
1823
		if (error)
1824
			break;
1825
		for (fcp = LIST_FIRST(&ip_fw_chain);
1826
			fcp && fcp->rule && fcp->rule->fw_number != frwl.fw_number;
1827
			fcp = LIST_NEXT(fcp, chain))
1828
			; /* nothing */
1829
1830
		if (!(fcp || fcp->rule)) {
1831
			error = EINVAL;
1832
			break;
1833
		}
1834
		memcpy(&frwl, fcp->rule, sizeof frwl);
1835
		error = sooptcopyout(sopt, &frwl, sizeof frwl);
1836
		break;
1837
1821
	default:
1838
	default:
1822
		printf("ip_fw_ctl invalid option %d\n", sopt->sopt_name);
1839
		printf("ip_fw_ctl invalid option %d\n", sopt->sopt_name);
1823
		error = EINVAL ;
1840
		error = EINVAL ;

Return to bug 18830