mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix eBPF support to shadowsocks
This commit is contained in:
parent
b6d8d49c35
commit
cecdab539d
3 changed files with 12 additions and 9 deletions
|
@ -299,8 +299,8 @@ diff -aurN shadowsocks-libev-nocrypto-nocrypto/src/redir.c shadowsocks-libev-noc
|
|||
#define IP6T_SO_ORIGINAL_DST 80
|
||||
#endif
|
||||
|
||||
+#define PARSE_PROG_FILENAME "sockmap_parse.o.ebpf"
|
||||
+#define VERDICT_PROG_FILENAME "sockmap_verdict.o.ebpf"
|
||||
+#define PARSE_PROG_FILENAME "/usr/lib/shadowsocks-libev/sockmap_parse.o.ebpf"
|
||||
+#define VERDICT_PROG_FILENAME "/usr/lib/shadowsocks-libev/sockmap_verdict.o.ebpf"
|
||||
+
|
||||
static void accept_cb(EV_P_ ev_io *w, int revents);
|
||||
static void server_recv_cb(EV_P_ ev_io *w, int revents);
|
||||
|
@ -511,7 +511,7 @@ diff -aurN shadowsocks-libev-nocrypto-nocrypto/src/redir.c shadowsocks-libev-noc
|
|||
+ PARSE_PROG_FILENAME, BPF_PROG_TYPE_SK_SKB,
|
||||
+ &pobj, &pfd);
|
||||
+ if(err < 0) {
|
||||
+ LOGE("Failed to load BPF object\n");
|
||||
+ LOGE("Failed to load BPF object (parse)\n");
|
||||
+ goto error_cleanup;
|
||||
+ }
|
||||
+
|
||||
|
@ -520,7 +520,7 @@ diff -aurN shadowsocks-libev-nocrypto-nocrypto/src/redir.c shadowsocks-libev-noc
|
|||
+ VERDICT_PROG_FILENAME, BPF_PROG_TYPE_SK_SKB,
|
||||
+ &vobj, &vfd);
|
||||
+ if(err < 0) {
|
||||
+ LOGE("Failed to load BPF object\n");
|
||||
+ LOGE("Failed to load BPF object (verdict)\n");
|
||||
+ goto error_cleanup;
|
||||
+ }
|
||||
+
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue