uml: net: vector: fix const issue
authorJohannes Berg <johannes.berg@intel.com>
Mon, 31 Jan 2022 14:35:27 +0000 (15:35 +0100)
committerRichard Weinberger <richard@nod.at>
Fri, 11 Mar 2022 09:47:05 +0000 (10:47 +0100)
Since the constification of MAC addresses, the argument
to uml_vector_default_bpf() must be const.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-By: anton ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/vector_user.c
arch/um/drivers/vector_user.h

index e4ffeb9..c650e42 100644 (file)
@@ -771,7 +771,7 @@ int uml_vector_detach_bpf(int fd, void *bpf)
                printk(KERN_ERR BPF_DETACH_FAIL, prog->len, prog->filter, fd, -errno);
        return err;
 }
-void *uml_vector_default_bpf(void *mac)
+void *uml_vector_default_bpf(const void *mac)
 {
        struct sock_filter *bpf;
        uint32_t *mac1 = (uint32_t *)(mac + 2);
index d29d5fd..3a73d17 100644 (file)
@@ -97,7 +97,7 @@ extern int uml_vector_recvmmsg(
        unsigned int vlen,
        unsigned int flags
 );
-extern void *uml_vector_default_bpf(void *mac);
+extern void *uml_vector_default_bpf(const void *mac);
 extern void *uml_vector_user_bpf(char *filename);
 extern int uml_vector_attach_bpf(int fd, void *bpf);
 extern int uml_vector_detach_bpf(int fd, void *bpf);