Skip to content

Commit

Permalink
uml: net: vector: fix const issue
Browse files Browse the repository at this point in the history
Since the constification of MAC addresses, the argument
to uml_vector_default_bpf() must be const.

Signed-off-by: Johannes Berg <[email protected]>
Acked-By: anton ivanov <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
  • Loading branch information
jmberg-intel authored and richardweinberger committed Mar 11, 2022
1 parent d2a0a61 commit b5fa1d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/um/drivers/vector_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/um/drivers/vector_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b5fa1d0

Please sign in to comment.