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 [--unload]\n", argv[0]); return 1;