[PATCH] bpf.2: Fix bug in example

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Oded Elisha <oded123456@xxxxxxxxx>
---
 man2/bpf.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man2/bpf.2 b/man2/bpf.2
index d4dc687f6..f089535ed 100644
--- a/man2/bpf.2
+++ b/man2/bpf.2
@@ -988,7 +988,7 @@ main(int argc, char **argv)
     };
 
     prog_fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, prog,
-                            sizeof(prog), "GPL");
+                            sizeof(prog) / sizeof(prog[0]), "GPL");
 
     sock = open_raw_sock("lo");
 
-- 
2.19.2




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux