blob: 7fe57b19cf24aff4c36f953968dedf6a2ba74903 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
diff --git a/preserve-dscp/preserve-dscp.c b/preserve-dscp/preserve-dscp.c
index 8c66186..5916fc5 100644
--- a/preserve-dscp/preserve-dscp.c
+++ b/preserve-dscp/preserve-dscp.c
@@ -13,7 +13,7 @@
int main(int argc, char *argv[])
{
- const char *filename = "preserve_dscp_kern.o";
+ char *filename = 0;
char *ifname_pre, *ifname_post;
int ifindex_pre, ifindex_post;
struct bpf_map *map = NULL;
@@ -26,6 +26,10 @@ int main(int argc, char *argv[])
DECLARE_LIBBPF_OPTS(bpf_tc_opts, attach_post);
+ if (!(filename = getenv("PRESERVE_DSCP_KERN")))
+ filename = "preserve_dscp_kern.o";
+
+
if (argc < 3) {
fprintf(stderr, "Usage: %s <if pre> <if post> [--unload]\n", argv[0]);
return 1;
|