Commit b5fa1d09 authored by Johannes Berg's avatar Johannes Berg Committed by Richard Weinberger

uml: net: vector: fix const issue

Since the constification of MAC addresses, the argument
to uml_vector_default_bpf() must be const.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Acked-By: default avataranton ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent d2a0a616
...@@ -771,7 +771,7 @@ int uml_vector_detach_bpf(int fd, void *bpf) ...@@ -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); printk(KERN_ERR BPF_DETACH_FAIL, prog->len, prog->filter, fd, -errno);
return err; return err;
} }
void *uml_vector_default_bpf(void *mac) void *uml_vector_default_bpf(const void *mac)
{ {
struct sock_filter *bpf; struct sock_filter *bpf;
uint32_t *mac1 = (uint32_t *)(mac + 2); uint32_t *mac1 = (uint32_t *)(mac + 2);
......
...@@ -97,7 +97,7 @@ extern int uml_vector_recvmmsg( ...@@ -97,7 +97,7 @@ extern int uml_vector_recvmmsg(
unsigned int vlen, unsigned int vlen,
unsigned int flags 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 void *uml_vector_user_bpf(char *filename);
extern int uml_vector_attach_bpf(int fd, void *bpf); extern int uml_vector_attach_bpf(int fd, void *bpf);
extern int uml_vector_detach_bpf(int fd, void *bpf); extern int uml_vector_detach_bpf(int fd, void *bpf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment