]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
bpf: minor fix in api and bpf_dump_error() usage
authorDaniel Borkmann <daniel@iogearbox.net>
Mon, 14 Dec 2015 15:57:32 +0000 (16:57 +0100)
committerStephen Hemminger <shemming@brocade.com>
Fri, 18 Dec 2015 01:22:25 +0000 (17:22 -0800)
Fix a whitespace in bpf_dump_error() usage, and also a missing closing
bracket in ntohl() macro for eBPF programs.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/bpf_api.h
tc/tc_bpf.c

index 8503b9a56625ef3b5b8ecff48ecae67accb35329..0666a312e35ce75f5d49d645ee99c8bda66ab260 100644 (file)
@@ -53,7 +53,7 @@
 #endif
 
 #ifndef ntohl
-# define ntohl(X)              __constant_ntohl((X)
+# define ntohl(X)              __constant_ntohl((X))
 #endif
 
 /** Section helper macros. */
index beb74be6c7d543c008aa873d156c083dd94c2464..f9b2b007f94388a0eb82dd56f39723a9323514c6 100644 (file)
@@ -1042,7 +1042,7 @@ static int bpf_prog_attach(const char *section,
                               "license:\'%s\') %s%s (%d)!\n\n",
                               section, prog->type,
                               prog->size / sizeof(struct bpf_insn),
-                              prog->license, fd < 0 ? "rejected :" :
+                              prog->license, fd < 0 ? "rejected" :
                               "loaded", fd < 0 ? strerror(errno) : "",
                               fd < 0 ? errno : fd);
        }