FreeBSD Bugzilla – Attachment 9139 Details for
Bug 18830
add IP_FW_GETRULE to ipfw, in order to get single rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.44 KB, created by
alex
on 2000-05-26 13:10:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
alex
Created:
2000-05-26 13:10:01 UTC
Size:
1.44 KB
patch
obsolete
>Index: in.h >=================================================================== >RCS file: /home/ncvs/src/sys/netinet/in.h,v >retrieving revision 1.49 >diff -u -r1.49 in.h >--- in.h 2000/05/06 18:19:58 1.49 >+++ in.h 2000/05/25 19:48:11 >@@ -337,6 +337,7 @@ > #define IP_FW_ZERO 53 /* clear single/all firewall counter(s) */ > #define IP_FW_GET 54 /* get entire firewall rule chain */ > #define IP_FW_RESETLOG 55 /* reset logging counters */ >+#define IP_FW_GETRULE 56 /* get a single rule */ > > #define IP_DUMMYNET_CONFIGURE 60 /* add/configure a dummynet pipe */ > #define IP_DUMMYNET_DEL 61 /* delete a dummynet pipe from chain */ >Index: ip_fw.c >=================================================================== >RCS file: /home/ncvs/src/sys/netinet/ip_fw.c,v >retrieving revision 1.135 >diff -u -r1.135 ip_fw.c >--- ip_fw.c 2000/05/23 20:38:16 1.135 >+++ ip_fw.c 2000/05/26 11:52:34 >@@ -1818,6 +1818,23 @@ > } > break; > >+ case IP_FW_GETRULE: >+ error = sooptcopyin(sopt, &frwl, sizeof frwl, sizeof frwl); >+ if (error) >+ break; >+ for (fcp = LIST_FIRST(&ip_fw_chain); >+ fcp && fcp->rule && fcp->rule->fw_number != frwl.fw_number; >+ fcp = LIST_NEXT(fcp, chain)) >+ ; /* nothing */ >+ >+ if (!(fcp || fcp->rule)) { >+ error = EINVAL; >+ break; >+ } >+ memcpy(&frwl, fcp->rule, sizeof frwl); >+ error = sooptcopyout(sopt, &frwl, sizeof frwl); >+ break; >+ > default: > printf("ip_fw_ctl invalid option %d\n", sopt->sopt_name); > error = EINVAL ;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18830
: 9139 |
9140