Skip to content

Commit

Permalink
Merge pull request iovisor#1447 from yadutaf/fix-solisten
Browse files Browse the repository at this point in the history
solisten.py maintenance
  • Loading branch information
yonghong-song authored Nov 20, 2017
2 parents a3bfe09 + 6e2eaf8 commit 10f3f22
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/solisten.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@

# BPF Program
bpf_text = """
#include <net/sock.h>
#include <net/inet_sock.h>
#include <net/net_namespace.h>
#include <bcc/proto.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wenum-conversion"
#include <net/inet_sock.h>
#pragma clang diagnostic pop
// Common structure for UDP/TCP IPv4/IPv6
struct listen_evt_t {
Expand Down Expand Up @@ -106,7 +108,6 @@
// Get IP
if (family == AF_INET) {
evt.laddr[0] = inet->inet_rcv_saddr;
evt.laddr[0] = be32_to_cpu(evt.laddr[0]);
} else if (family == AF_INET6) {
bpf_probe_read(evt.laddr, sizeof(evt.laddr),
sk->__sk_common.skc_v6_rcv_saddr.in6_u.u6_addr32);
Expand Down

0 comments on commit 10f3f22

Please sign in to comment.