[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH3MdRVk5J2T+L7wOg4FmkWiR58JNqUPTZ+Eq-ZzGhaKVMYJBQ@mail.gmail.com>
Date: Sun, 28 May 2017 22:31:36 -0700
From: Y Song <ys114321@...il.com>
To: Adel Fuchs <adelfuchs@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: running an eBPF program
On Sun, May 28, 2017 at 12:38 AM, Adel Fuchs <adelfuchs@...il.com> wrote:
> Hi,
> Is there any way to run this eBPF program without that patch?
> Alternatively, is there any other eBPF sample that does run properly? I need
> to run a program that filters packets according to IP address or port.
The following is temporary workaround you can use:
int poff, nh_off = BPF_LL_OFF + ETH_HLEN;
- __be16 proto = skb->protocol;
+ __be16 proto = (__be16)*(volatile __u32 *)&skb->protocol;
__u8 ip_proto;
Powered by blists - more mailing lists