diff options
Diffstat (limited to 'overlays/preserve-dscp/kern_env.patch')
-rw-r--r-- | overlays/preserve-dscp/kern_env.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/overlays/preserve-dscp/kern_env.patch b/overlays/preserve-dscp/kern_env.patch new file mode 100644 index 00000000..7fe57b19 --- /dev/null +++ b/overlays/preserve-dscp/kern_env.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | diff --git a/preserve-dscp/preserve-dscp.c b/preserve-dscp/preserve-dscp.c | ||
2 | index 8c66186..5916fc5 100644 | ||
3 | --- a/preserve-dscp/preserve-dscp.c | ||
4 | +++ b/preserve-dscp/preserve-dscp.c | ||
5 | @@ -13,7 +13,7 @@ | ||
6 | |||
7 | int main(int argc, char *argv[]) | ||
8 | { | ||
9 | - const char *filename = "preserve_dscp_kern.o"; | ||
10 | + char *filename = 0; | ||
11 | char *ifname_pre, *ifname_post; | ||
12 | int ifindex_pre, ifindex_post; | ||
13 | struct bpf_map *map = NULL; | ||
14 | @@ -26,6 +26,10 @@ int main(int argc, char *argv[]) | ||
15 | DECLARE_LIBBPF_OPTS(bpf_tc_opts, attach_post); | ||
16 | |||
17 | |||
18 | + if (!(filename = getenv("PRESERVE_DSCP_KERN"))) | ||
19 | + filename = "preserve_dscp_kern.o"; | ||
20 | + | ||
21 | + | ||
22 | if (argc < 3) { | ||
23 | fprintf(stderr, "Usage: %s <if pre> <if post> [--unload]\n", argv[0]); | ||
24 | return 1; | ||